Browse Source

avcodec/rawdec: initialize palette for mono

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0
Mats Peterson Michael Niedermayer 10 years ago
parent
commit
fe7639b1c8
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavcodec/rawdec.c

+ 4
- 1
libavcodec/rawdec.c View File

@@ -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…
Cancel
Save