Commit fe7639b1 authored by Mats Peterson's avatar Mats Peterson Committed by Michael Niedermayer

avcodec/rawdec: initialize palette for mono

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1d8f9b7d
......@@ -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 &&
......
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