[FFmpeg-cvslog] avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()

Michael Niedermayer git at videolan.org
Wed May 13 18:43:43 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May 13 18:36:19 2015 +0200| [81cf9108563510dee24f73b2c5d94a7bd07ff747] | committer: Michael Niedermayer

avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=81cf9108563510dee24f73b2c5d94a7bd07ff747
---

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index b3dc246..1ce3328 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -189,7 +189,7 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s)
                                  s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1;
         av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n",
                index, s->qscale[index]);
-        len -= 65;
+        len -= 1 + 64 * (1+pr);
     }
     return 0;
 }



More information about the ffmpeg-cvslog mailing list