diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-15 17:21:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-15 17:21:48 +0200 |
commit | cdd25f9a3df3905543a5546cf6076d2eaf895736 (patch) | |
tree | 495a2f7be652084c9198d3fc4469edd4f9e9946c /libavcodec/smvjpegdec.c | |
parent | 294469416d8193a28710d802bb0c46e5fa09fad7 (diff) | |
download | ffmpeg-cdd25f9a3df3905543a5546cf6076d2eaf895736.tar.gz |
avcodec/smvjpegdec: check avcodec_decode_video2() return code
Fixes CID1271810
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/smvjpegdec.c')
-rw-r--r-- | libavcodec/smvjpegdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index f30d240e2c..45faff29fc 100644 --- a/libavcodec/smvjpegdec.c +++ b/libavcodec/smvjpegdec.c @@ -156,6 +156,10 @@ static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_siz if (!cur_frame) { av_frame_unref(mjpeg_data); ret = avcodec_decode_video2(s->avctx, mjpeg_data, &s->mjpeg_data_size, avpkt); + if (ret < 0) { + s->mjpeg_data_size = 0; + return ret; + } } else if (!s->mjpeg_data_size) return AVERROR(EINVAL); |