Implement refmode == 2 in gif demuxer

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21910 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-01-13 12:37:53 +00:00
parent 9cfea7d129
commit 5b7eb989f2
1 changed files with 8 additions and 4 deletions

View File

@ -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;