[FFmpeg-cvslog] lavc/mjpegdec: Do not skip reading quantization tables.
Carl Eugen Hoyos
git at videolan.org
Sat Sep 3 16:42:44 EEST 2016
ffmpeg | branch: release/3.1 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Sep 2 17:10:57 2016 +0200| [677ea4a49b2e7e9ee28fb5e62f9aec73d7acb272] | committer: Carl Eugen Hoyos
lavc/mjpegdec: Do not skip reading quantization tables.
They may contain 0xFFs, confusing the start code finding algorithm.
Fixes ticket #5819.
(cherry picked from commit cef5bc0e6e2320d3903cf063d59cef83e91dbc3c)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=677ea4a49b2e7e9ee28fb5e62f9aec73d7acb272
---
libavcodec/mjpegdec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 633a8f0..0645a1d 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2119,6 +2119,8 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
ret = mjpeg_decode_com(s);
if (ret < 0)
return ret;
+ } else if (start_code == DQT) {
+ ff_mjpeg_decode_dqt(s);
}
ret = -1;
@@ -2151,9 +2153,6 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
s->restart_count = 0;
/* nothing to do on SOI */
break;
- case DQT:
- ff_mjpeg_decode_dqt(s);
- break;
case DHT:
if ((ret = ff_mjpeg_decode_dht(s)) < 0) {
av_log(avctx, AV_LOG_ERROR, "huffman table decode error\n");
More information about the ffmpeg-cvslog
mailing list