aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-12-21 18:18:39 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-12-21 18:18:39 +0100
commita3a22c2178f8d85e9a135c0c5c5cb6f60aaad15d (patch)
tree6598df9e8a1d6c94b8dc3688c3297de121e3308a /libavcodec
parent0fb79f30db138e3686fbfcf88ba58ea7c1e61bfc (diff)
downloadffmpeg-a3a22c2178f8d85e9a135c0c5c5cb6f60aaad15d.tar.gz
Revert "Always write all colours for animated gif files, including transparent ones."
It breaks some opaque samples. This reverts commit d4fdaafdb76a927be6fea15013807641bbcc6bd9.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/gifdec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index e58e19f5bf..4f44fd4d53 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -241,9 +241,8 @@ static int gif_read_image(GifState *s)
pr = ptr + width;
for (px = ptr, idx = s->idx_line; px < pr; px++, idx++) {
- *px = pal[*idx];
- if (*idx == s->transparent_color_index)
- *px &= 0xFFFFFF;
+ if (*idx != s->transparent_color_index)
+ *px = pal[*idx];
}
if (is_interleaved) {