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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Mats Peterson 2016-02-12 11:24:30 +01:00 committed by Michael Niedermayer
parent f80b4750b9
commit bbb45773b0
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}