[FFmpeg-cvslog] avcodec/rawdec: Initialize default mono palette only for bits_per_coded_sample == 1
Mats Peterson
git at videolan.org
Sat Feb 13 01:23:04 CET 2016
ffmpeg | branch: master | Mats Peterson <matsp888 at yahoo.com> | Fri Feb 12 11:24:30 2016 +0100| [bbb45773b0436887b92e3a7eab79d5b460398f77] | committer: Michael Niedermayer
avcodec/rawdec: Initialize default mono palette only for bits_per_coded_sample == 1
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbb45773b0436887b92e3a7eab79d5b460398f77
---
libavcodec/rawdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index b7ce2b6..1b85b96 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -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);
}
}
More information about the ffmpeg-cvslog
mailing list