[FFmpeg-cvslog] lavc/mjpegdec: Do not skip reading quantization tables.
Carl Eugen Hoyos
git at videolan.org
Sat Sep 3 16:42:43 EEST 2016
ffmpeg | branch: release/3.0 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Sep 2 17:10:57 2016 +0200| [17035c8d2eb38d1e1c6adf7962e75dbd45e6351e] | 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)
Conflicts:
libavcodec/mjpegdec.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17035c8d2eb38d1e1c6adf7962e75dbd45e6351e
---
libavcodec/mjpegdec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 4bde42f..f002ccd 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2104,6 +2104,9 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
/* Comment */
else if (start_code == COM)
mjpeg_decode_com(s);
+ else if (start_code == DQT) {
+ ff_mjpeg_decode_dqt(s);
+ }
ret = -1;
@@ -2135,9 +2138,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