mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-10 09:09:50 +00:00
svq1enc: check ff_get_buffer return value
CC: libav-stable@libav.org
Bug-Id: CID 747723
(cherry picked from commit 59846452af
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
dd195c2c58
commit
21aeae9c67
@ -580,8 +580,12 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
}
|
||||
|
||||
if (!s->current_picture->data[0]) {
|
||||
ff_get_buffer(avctx, s->current_picture, 0);
|
||||
ff_get_buffer(avctx, s->last_picture, 0);
|
||||
ret = ff_get_buffer(avctx, s->current_picture, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ret = ff_get_buffer(avctx, s->last_picture, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
s->scratchbuf = av_malloc(s->current_picture->linesize[0] * 16 * 2);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user