Commit 4ac430cd authored by kostya's avatar kostya

Make PNG produce correct 8-bit pictures

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6689 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 00a0c0d1
......@@ -850,7 +850,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 != 0xff)
if (alpha && alpha != 0xff)
has_alpha = 1;
*alpha_ptr++ = alpha;
ptr[0] = v >> 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment