diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-12 11:13:07 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-01-13 00:16:41 +0100 |
commit | 21aeae9c679657a1537d0d9127eff280bafc901a (patch) | |
tree | d68f28887de1ea7c57285f3b6660f39840953a69 /libavcodec | |
parent | dd195c2c587f44dbc4be7f059ed182f7d83e6cb4 (diff) | |
download | ffmpeg-21aeae9c679657a1537d0d9127eff280bafc901a.tar.gz |
svq1enc: check ff_get_buffer return value
CC: libav-stable@libav.org
Bug-Id: CID 747723
(cherry picked from commit 59846452af762f6af5ced4399e8dcd709ca50fcd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/svq1enc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 361c465569..d70bba3b9d 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -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); } |