[FFmpeg-cvslog] Do not ignore full transparency when writing png palette.
Carl Eugen Hoyos
git at videolan.org
Wed Dec 7 11:35:03 CET 2011
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Dec 7 11:31:27 2011 +0100| [a99dbe014dbd01b227f97e7d7f0f72b3ae4f9be0] | committer: Carl Eugen Hoyos
Do not ignore full transparency when writing png palette.
This reverts r6689, "Make PNG produce correct 8-bit pictures".
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a99dbe014dbd01b227f97e7d7f0f72b3ae4f9be0
---
libavcodec/pngenc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 29f4e1a..b35402e 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -336,7 +336,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
for(i = 0; i < 256; i++) {
v = palette[i];
alpha = v >> 24;
- if (alpha && alpha != 0xff)
+ if (alpha != 0xff)
has_alpha = 1;
*alpha_ptr++ = alpha;
bytestream_put_be24(&ptr, v);
More information about the ffmpeg-cvslog
mailing list