changeset 3106:ed30b032fa7b libavformat

Fix decoding of interlaced gif, e.g. http://samples.mplayerhq.hu/GIF/7up.gif
author reimar
date Mon, 03 Mar 2008 13:16:29 +0000
parents 2b9c6bfc04a5
children 483860e90d58
files gifdec.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gifdec.c	Mon Mar 03 01:27:15 2008 +0000
+++ b/gifdec.c	Mon Mar 03 13:16:29 2008 +0000
@@ -364,11 +364,8 @@
                 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;