Merge commit 'c8e135ea92
'
* commit 'c8e135ea92
': vaapi_encode: Allocate slice structures and parameter buffers dynamically Already present ase4a6eb70f4
, one minor fix for libav merged. Merged-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
commit
fe1fb48e2b
1 changed files with 6 additions and 4 deletions
|
@ -321,10 +321,12 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pic->slices = av_mallocz_array(pic->nb_slices, sizeof(*pic->slices));
|
if (pic->nb_slices > 0) {
|
||||||
if (!pic->slices) {
|
pic->slices = av_mallocz_array(pic->nb_slices, sizeof(*pic->slices));
|
||||||
err = AVERROR(ENOMEM);
|
if (!pic->slices) {
|
||||||
goto fail;
|
err = AVERROR(ENOMEM);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; i < pic->nb_slices; i++) {
|
for (i = 0; i < pic->nb_slices; i++) {
|
||||||
slice = &pic->slices[i];
|
slice = &pic->slices[i];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue