[FFmpeg-cvslog] avcodec/smvjpegdec: check avcodec_decode_video2() return code
Michael Niedermayer
git at videolan.org
Sat May 16 00:16:25 CEST 2015
ffmpeg | branch: release/2.6 | Michael Niedermayer <michaelni at gmx.at> | Fri May 15 17:21:10 2015 +0200| [211ec9196dffc3d2261e5bf27a003947dcc598cc] | 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=211ec9196dffc3d2261e5bf27a003947dcc598cc
---
libavcodec/smvjpegdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c
index 375c9d9..c99b029 100644
--- a/libavcodec/smvjpegdec.c
+++ b/libavcodec/smvjpegdec.c
@@ -155,6 +155,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