[FFmpeg-cvslog] Fix decoding of msrle samples with 1bpp.

Carl Eugen Hoyos git at videolan.org
Sun May 15 03:29:41 CEST 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun May 15 02:38:02 2011 +0200| [445ee35e21c92e2429241d65bdba65f6e7c09132] | committer: Carl Eugen Hoyos

Fix decoding of msrle samples with 1bpp.

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

 libavcodec/msrle.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index a5c80ff..496eb40 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -93,7 +93,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
         return -1;
     }
 
-    if (avctx->bits_per_coded_sample <= 8) {
+    if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) {
         const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
 
         if (pal) {



More information about the ffmpeg-cvslog mailing list