diff options
author | Dustin Brody <libav@parsoma.net> | 2011-08-11 19:16:09 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-08-12 03:02:18 +0400 |
commit | 21d70372341d0e7a1c5ac34c4522850f40c503d5 (patch) | |
tree | a39f743560891ea212392233d5d9d63948639df6 /libavcodec/mjpegdec.c | |
parent | bac3ab13ea6a9dd8853e79ef3eacf51d234c8774 (diff) |
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/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index c4cfd1af18..81effb4f8c 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1525,7 +1525,9 @@ eoi_parser: av_log(avctx, AV_LOG_WARNING, "Can not process SOS before SOF, skipping\n"); break; } - ff_mjpeg_decode_sos(s, NULL, NULL); + if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 && + avctx->error_recognition >= FF_ER_EXPLODE) + return AVERROR_INVALIDDATA; /* buggy avid puts EOI every 10-20th frame */ /* if restart period is over process EOI */ if ((s->buggy_avid && !s->interlaced) || s->restart_interval) |