You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Always write all colours for animated gif files, including transparent ones.
This fixes the colour of the transparent background (as seen with ffplay), and makes the background of some non-keyframes transparent that was incorrectly shown as opaque for some samples.
This commit is contained in:
@@ -241,8 +241,9 @@ static int gif_read_image(GifState *s)
|
|||||||
pr = ptr + width;
|
pr = ptr + width;
|
||||||
|
|
||||||
for (px = ptr, idx = s->idx_line; px < pr; px++, idx++) {
|
for (px = ptr, idx = s->idx_line; px < pr; px++, idx++) {
|
||||||
if (*idx != s->transparent_color_index)
|
|
||||||
*px = pal[*idx];
|
*px = pal[*idx];
|
||||||
|
if (*idx == s->transparent_color_index)
|
||||||
|
*px &= 0xFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_interleaved) {
|
if (is_interleaved) {
|
||||||
|
Reference in New Issue
Block a user