[FFmpeg-cvslog] ljpegdec: Fix the left column of rgb24 decoding

Michael Niedermayer git at videolan.org
Tue Jan 10 23:15:23 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan  9 20:12:33 2012 +0100| [24be30de6405fbcc5fd978b915def2722bf8026e] | committer: Michael Niedermayer

ljpegdec: Fix the left column of rgb24 decoding

Fixes Ticket894

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

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

 libavcodec/mjpegdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ebe7af5..458d132 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -730,7 +730,7 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
                 for(i=0; i<3; i++)
                     top[i] = left[i]= topleft[i]= 1 << (s->bits - 1);
             }
-            if (mb_y == resync_mb_y || mb_y == resync_mb_y+1 && mb_x < resync_mb_x)
+            if (mb_y == resync_mb_y || mb_y == resync_mb_y+1 && mb_x < resync_mb_x || !mb_x)
                 modified_predictor = 1;
 
             for (i=0;i<nb_components;i++) {



More information about the ffmpeg-cvslog mailing list