diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-28 13:51:24 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-01-28 13:51:24 +0000 |
commit | 48eb95537d776a836c0f7860008f667b6d4c1548 (patch) | |
tree | 7cec52bbbf4147f58e6fa8cd0945040929937409 /libmpdemux | |
parent | b18dcf9f0e4e4d912f950f854c67a2a8be97175b (diff) | |
download | mpv-48eb95537d776a836c0f7860008f667b6d4c1548.tar.bz2 mpv-48eb95537d776a836c0f7860008f667b6d4c1548.tar.xz |
Fix number of rows in interlaced mode.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22042 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_gif.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c index 4daaf5efd5..bdd8860abf 100644 --- a/libmpdemux/demux_gif.c +++ b/libmpdemux/demux_gif.c @@ -176,19 +176,23 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) if (gif->Image.Interlace) { uint8_t *s = buf; - memcpy_transp_pic(dest, s, w, h >> 3, + int ih = (h - 0 + 7) >> 3; + memcpy_transp_pic(dest, s, w, ih, priv->w << 3, gif->Image.Width, transparency, transparent_col); - s += (h >> 3) * w; - memcpy_transp_pic(dest + (priv->w << 2), s, w, h >> 3, + s += ih * w; + ih = (h - 4 + 7) >> 3; + memcpy_transp_pic(dest + (priv->w << 2), s, w, ih, priv->w << 3, gif->Image.Width, transparency, transparent_col); - s += (h >> 3) * w; - memcpy_transp_pic(dest + (priv->w << 1), s, w, h >> 2, + s += ih * w; + ih = (h - 2 + 3) >> 2; + memcpy_transp_pic(dest + (priv->w << 1), s, w, ih, priv->w << 2, gif->Image.Width, transparency, transparent_col); - s += (h >> 2) * w; - memcpy_transp_pic(dest + priv->w, s, w, h >> 1, + s += ih * w; + ih = (h - 1 + 1) >> 1; + memcpy_transp_pic(dest + priv->w, s, w, ih, priv->w << 1, gif->Image.Width, transparency, transparent_col); } else |