mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
avcodec/rawdec: initialize palette for mono
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1d8f9b7d1a
commit
fe7639b1c8
@ -94,8 +94,11 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
|
||||
return AVERROR(ENOMEM);
|
||||
if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
|
||||
avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt);
|
||||
else
|
||||
else {
|
||||
memset(context->palette->data, 0, AVPALETTE_SIZE);
|
||||
if (avctx->bits_per_coded_sample == 1)
|
||||
memset(context->palette->data, 0xff, 4);
|
||||
}
|
||||
}
|
||||
|
||||
if ((avctx->extradata_size >= 9 &&
|
||||
|
Loading…
Reference in New Issue
Block a user