diff options
author | Dustin Brody <libav@parsoma.net> | 2011-08-11 11:16:09 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-08-11 16:02:18 -0700 |
commit | 21d70372341d0e7a1c5ac34c4522850f40c503d5 (patch) | |
tree | a39f743560891ea212392233d5d9d63948639df6 /libavcodec/mxpegdec.c | |
parent | bac3ab13ea6a9dd8853e79ef3eacf51d234c8774 (diff) | |
download | ffmpeg-21d70372341d0e7a1c5ac34c4522850f40c503d5.tar.gz |
mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/mxpegdec.c')
-rw-r--r-- | libavcodec/mxpegdec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c index e710291501..92fd244ec7 100644 --- a/libavcodec/mxpegdec.c +++ b/libavcodec/mxpegdec.c @@ -275,9 +275,13 @@ static int mxpeg_decode_frame(AVCodecContext *avctx, return AVERROR(ENOMEM); } - ff_mjpeg_decode_sos(jpg, s->mxm_bitmask, reference_ptr); + ret = ff_mjpeg_decode_sos(jpg, s->mxm_bitmask, reference_ptr); + if (ret < 0 && avctx->error_recognition >= FF_ER_EXPLODE) + return ret; } else { - ff_mjpeg_decode_sos(jpg, NULL, NULL); + ret = ff_mjpeg_decode_sos(jpg, NULL, NULL); + if (ret < 0 && avctx->error_recognition >= FF_ER_EXPLODE) + return ret; } break; |