mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Make PNG produce correct 8-bit pictures
Originally committed as revision 6689 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4ec0beaa59
commit
ab9ce19170
@ -850,7 +850,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
for(i = 0; i < 256; i++) {
|
for(i = 0; i < 256; i++) {
|
||||||
v = palette[i];
|
v = palette[i];
|
||||||
alpha = v >> 24;
|
alpha = v >> 24;
|
||||||
if (alpha != 0xff)
|
if (alpha && alpha != 0xff)
|
||||||
has_alpha = 1;
|
has_alpha = 1;
|
||||||
*alpha_ptr++ = alpha;
|
*alpha_ptr++ = alpha;
|
||||||
ptr[0] = v >> 16;
|
ptr[0] = v >> 16;
|
||||||
|
Loading…
Reference in New Issue
Block a user