Skip to content
Snippets Groups Projects
Commit fe7639b1 authored by Mats Peterson's avatar Mats Peterson Committed by Michael Niedermayer
Browse files

avcodec/rawdec: initialize palette for mono

parent 1d8f9b7d
No related branches found
No related tags found
No related merge requests found
...@@ -94,8 +94,11 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) ...@@ -94,8 +94,11 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt); avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt);
else else {
memset(context->palette->data, 0, AVPALETTE_SIZE); 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 && if ((avctx->extradata_size >= 9 &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment