ffmpeg | branch: master | Mats Peterson <matsp...@yahoo.com> | Tue Jan 19 
18:48:06 2016 +0100| [fe7639b1c8be49ced7465c6a91a9008f406cc5ba] | committer: 
Michael Niedermayer

avcodec/rawdec: initialize palette for mono

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe7639b1c8be49ced7465c6a91a9008f406cc5ba
---

 libavcodec/rawdec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index cb0364c..1ab7112 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -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 &&

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to