[FFmpeg-cvslog] r12297 - trunk/libavformat/gifdec.c

reimar subversion
Mon Mar 3 14:16:30 CET 2008


Author: reimar
Date: Mon Mar  3 14:16:29 2008
New Revision: 12297

Log:
Fix decoding of interlaced gif, e.g. http://samples.mplayerhq.hu/GIF/7up.gif


Modified:
   trunk/libavformat/gifdec.c

Modified: trunk/libavformat/gifdec.c
==============================================================================
--- trunk/libavformat/gifdec.c	(original)
+++ trunk/libavformat/gifdec.c	Mon Mar  3 14:16:29 2008
@@ -364,11 +364,8 @@ static int gif_read_image(GifState *s)
                 y1 += 8;
                 ptr += linesize * 8;
                 if (y1 >= height) {
-                    y1 = 4;
-                    if (pass == 0)
-                        ptr = ptr1 + linesize * 4;
-                    else
-                        ptr = ptr1 + linesize * 2;
+                    y1 = pass == 0 ? 4 : 2;
+                    ptr = ptr1 + linesize * y1;
                     pass++;
                 }
                 break;




More information about the ffmpeg-cvslog mailing list