fix interlaced decoding, original patch from reimar
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 6 Mar 2008 09:45:59 +0000 (09:45 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 6 Mar 2008 09:45:59 +0000 (09:45 +0000)
Originally committed as revision 12349 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/gifdec.c

index 8f02526..d8f67b4 100644 (file)
@@ -126,11 +126,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 ? 2 : 4;
+                    ptr = ptr1 + linesize * y1;
                     pass++;
                 }
                 break;