[MPlayer-dev-eng] [PATCH] Various updates to GIF demuxer

Diego Biurrun diego at biurrun.de
Sat Jan 13 06:59:26 CET 2007


On Fri, Feb 03, 2006 at 04:55:34PM -0500, John Koleszar wrote:
> 
> Attached patch adds support for several animated gif features that 
> either weren't supported by or outright crashed mplayer, including 
> variable frame sizes, interlacing, transparency, and some alternative 
> frame update methods. Also fixed a bug extracting timestamps, which was 
> probably introduced by a change in giflib, since the code in question 
> dates back to rev 1.1.
> 
> Samples (courtesy of gifanimations.com) here: 
> ftp://opensource:opensource@ftp.on2.com/gifanimations_com-samples.tar.bz2

Samples moved to http://samples.mplayerhq.hu/GIF/

> --- libmpdemux/demux_gif.c	5 Aug 2005 19:57:46 -0000	1.5
> +++ libmpdemux/demux_gif.c	3 Feb 2006 20:50:45 -0000
> @@ -70,8 +86,13 @@
>        }
>        if (code == 0xF9) {
>          int frametime = 0;
>          if (p[0] == 4) // is the length correct?
> -          frametime = (p[1] << 8) | p[2]; // set the time, centiseconds
> +          frametime = (p[3] << 8) | p[2]; // set the time, centiseconds

This is the frametime fix, compare

http://www.onicos.com/staff/iz/formats/gif.html#gceb

to see that if p[0] is block size p[3] and p[2], not p[1] and p[2] must
be the delay time.

This hunk committed, it fixes several of the samples above.

Diego



More information about the MPlayer-dev-eng mailing list