# HG changeset patch # User reimar # Date 1168691873 0 # Node ID cf67d7115d99b4d5e5327d6ad0252f5dc839db16 # Parent d718eeaf06ea639dcb0875313efade3376271dfd Implement refmode == 2 in gif demuxer diff -r d718eeaf06ea -r cf67d7115d99 libmpdemux/demux_gif.c --- a/libmpdemux/demux_gif.c Sat Jan 13 12:19:42 2007 +0000 +++ b/libmpdemux/demux_gif.c Sat Jan 13 12:37:53 2007 +0000 @@ -145,15 +145,19 @@ } memcpy_pic(dest, buf, w, h, priv->w, gif->Image.Width); + + priv->useref = 1; + if (refmode == 1) memcpy(priv->refimg, dp->buffer, priv->w * priv->h); + 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); - 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) priv->useref = 0; - demuxer->video->dpos++; dp->pts = ((float)priv->current_pts) / 100; dp->pos = stream_tell(demuxer->stream);