mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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>
This commit is contained in:
parent
47e92153b6
commit
551d8b58eb
@ -193,6 +193,14 @@ static int brpix_decode_frame(AVCodecContext *avctx,
|
|||||||
s->frame.palette_has_changed = 1;
|
s->frame.palette_has_changed = 1;
|
||||||
|
|
||||||
chunk_type = bytestream2_get_be32(&gb);
|
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);
|
data_len = bytestream2_get_be32(&gb);
|
||||||
|
Loading…
Reference in New Issue
Block a user