diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-28 10:34:11 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-28 10:34:11 +0000 |
commit | fec3b1e82edd31351f4db0ae6cd195ae8cd5dca3 (patch) | |
tree | 71a0860303497e699c07050815360beeb1f2de7a /libmpdemux/demux_gif.c | |
parent | c518d68f2561eed5fb3ec8fad55c4d2b346d8d7a (diff) | |
download | mpv-fec3b1e82edd31351f4db0ae6cd195ae8cd5dca3.tar.bz2 mpv-fec3b1e82edd31351f4db0ae6cd195ae8cd5dca3.tar.xz |
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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22038 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_gif.c')
-rw-r--r-- | libmpdemux/demux_gif.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c index 00f5aa2cdb..ba8c6746d0 100644 --- a/libmpdemux/demux_gif.c +++ b/libmpdemux/demux_gif.c @@ -101,6 +101,13 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) { 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]; } |