diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-21 00:21:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-21 00:26:50 +0100 |
commit | 551d8b58ebc03114d4231df92e366ffb7bf7ff62 (patch) | |
tree | 05b1e2982096059de8b0a8f9a8a5669fd62005ea | |
parent | 47e92153b61b0dbf8af328c699e7239fbb472221 (diff) | |
download | ffmpeg-551d8b58ebc03114d4231df92e366ffb7bf7ff62.tar.gz |
brender_pix: use a grayscale palette as fallback instead of a uninitialized one.
Improves: 3-0-CORPSE.PIX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/brender_pix.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/brender_pix.c b/libavcodec/brender_pix.c index 5245fa0d71..6c63244ac9 100644 --- a/libavcodec/brender_pix.c +++ b/libavcodec/brender_pix.c @@ -193,6 +193,14 @@ static int brpix_decode_frame(AVCodecContext *avctx, s->frame.palette_has_changed = 1; chunk_type = bytestream2_get_be32(&gb); + } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { + uint32_t *pal_out = (uint32_t *)s->frame.data[1]; + int i; + + for (i = 0; i < 256; ++i) { + *pal_out++ = (0xFFU << 24) | (i * 0x010101); + } + s->frame.palette_has_changed = 1; } data_len = bytestream2_get_be32(&gb); |