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

avcodec/rawdec: Initialize default mono palette only for bits_per_coded_sample == 1

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent f80b4750
......@@ -100,7 +100,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt);
else {
memset(context->palette->data, 0, AVPALETTE_SIZE);
if (avctx->bits_per_coded_sample <= 1)
if (avctx->bits_per_coded_sample == 1)
memset(context->palette->data, 0xff, 4);
}
}
......
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