[MPlayer-cvslog] r22038 - trunk/libmpdemux/demux_gif.c

reimar subversion at mplayerhq.hu
Sun Jan 28 11:34:11 CET 2007


Author: reimar
Date: Sun Jan 28 11:34:11 2007
New Revision: 22038

Modified:
   trunk/libmpdemux/demux_gif.c

Log:
Hack: use refmode == 1 instead of == 0, as browsers behave like this
and buggy files like http://samples.mplayerhq.hu/GIF/broken-gif/CLAIRE.GIF
rely on this.


Modified: trunk/libmpdemux/demux_gif.c
==============================================================================
--- trunk/libmpdemux/demux_gif.c	(original)
+++ trunk/libmpdemux/demux_gif.c	Sun Jan 28 11:34:11 2007
@@ -101,6 +101,13 @@
         {
           transparency = p[1] & 1;
           refmode = (p[1] >> 2) & 3;
+          // HACK: specification says
+          // > 0 - No disposal specified. The decoder is not required to take any action.
+          // but browsers treat it the same way as
+          // > 1 - Do not dispose. The graphic is to be left in place.
+          // Some broken files rely on this, e.g.
+          // http://samples.mplayerhq.hu/GIF/broken-gif/CLAIRE.GIF
+          if (refmode == 0) refmode = 1;
           frametime = (p[3] << 8) | p[2]; // set the time, centiseconds
           transparent_col = p[4];  
         }



More information about the MPlayer-cvslog mailing list