[FFmpeg-cvslog] avcodec/smvjpegdec: check avcodec_decode_video2() return code
Michael Niedermayer
git at videolan.org
Wed Jun 17 22:09:43 CEST 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Fri May 15 17:21:10 2015 +0200| [49a759fb3fe9117c179b928c02ee7ef2d7f553b1] | committer: Michael Niedermayer
avcodec/smvjpegdec: check avcodec_decode_video2() return code
Fixes CID1271810
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit cdd25f9a3df3905543a5546cf6076d2eaf895736)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49a759fb3fe9117c179b928c02ee7ef2d7f553b1
---
libavcodec/smvjpegdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c
index f883ecf..41b9ed2 100644
--- a/libavcodec/smvjpegdec.c
+++ b/libavcodec/smvjpegdec.c
@@ -137,6 +137,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);
More information about the ffmpeg-cvslog
mailing list