diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 14:20:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 14:20:24 +0100 |
commit | 7effc26ba74717bb9c808d96791c7cf98911d1a1 (patch) | |
tree | 98a7e146e7e11f3660d9832cfb15461568c0d9f5 /libavcodec | |
parent | 1818a1130def42215ccb607edee9a2f370de6a6c (diff) | |
download | ffmpeg-7effc26ba74717bb9c808d96791c7cf98911d1a1.tar.gz |
svq1enc: check ff_get_buffer() return value
Fixes CID747723
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/svq1enc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 216fa3b062..2850ab0284 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -547,8 +547,10 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } if (!s->current_picture.data[0]) { - ff_get_buffer(avctx, &s->current_picture); - ff_get_buffer(avctx, &s->last_picture); + if ((ret = ff_get_buffer(avctx, &s->current_picture) < 0) || + (ret = ff_get_buffer(avctx, &s->last_picture)) < 0) { + return ret; + } s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2); } |