# HG changeset patch # User reimar # Date 1204550189 0 # Node ID ed30b032fa7bbb57ec693631f35bfc0aed6e3088 # Parent 2b9c6bfc04a5454315207f1ba3b78882e86410a7 Fix decoding of interlaced gif, e.g. http://samples.mplayerhq.hu/GIF/7up.gif diff -r 2b9c6bfc04a5 -r ed30b032fa7b gifdec.c --- 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;