summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-13 12:37:53 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-13 12:37:53 +0000
commit5b7eb989f2fc85f5b1c2ee4951cbae750c1d6dd5 (patch)
treebd9a2a18f442613dbfb8477051b0ec48a41a9fa3 /libmpdemux
parent9cfea7d129c01cb62d4cd45d630f0b74f1c0d4d0 (diff)
downloadmpv-5b7eb989f2fc85f5b1c2ee4951cbae750c1d6dd5.tar.bz2
mpv-5b7eb989f2fc85f5b1c2ee4951cbae750c1d6dd5.tar.xz
Implement refmode == 2 in gif demuxer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21910 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_gif.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c
index f287cf72ec..4c402b4076 100644
--- a/libmpdemux/demux_gif.c
+++ b/libmpdemux/demux_gif.c
@@ -145,14 +145,18 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
}
memcpy_pic(dest, buf, w, h, priv->w, gif->Image.Width);
- }
-
- free(buf);
priv->useref = 1;
if (refmode == 1) memcpy(priv->refimg, dp->buffer, priv->w * priv->h);
- // TODO: refmode == 2, set area of current image to background color
+ if (refmode == 2 && priv->useref) {
+ dest = priv->refimg + priv->w * t + l;
+ memset(buf, gif->SBackGroundColor, len);
+ memcpy_pic(dest, buf, w, h, priv->w, gif->Image.Width);
+ }
if (!refmode) priv->useref = 0;
+ }
+
+ free(buf);
demuxer->video->dpos++;
dp->pts = ((float)priv->current_pts) / 100;