[FFmpeg-cvslog] iff: decode HAM8 images with masking correctly.

Piotr Bandurski git at videolan.org
Sun Nov 18 15:49:12 CET 2012


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Sun Nov 18 15:48:22 2012 +0100| [4413a8428a759d33ea58a0617551ba522833f87b] | committer: Carl Eugen Hoyos

iff: decode HAM8 images with masking correctly.

Fixes ticket #967.

Reviewed-by: Peter Ross

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

 libavcodec/iff.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 9184015..9582f9d 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -231,7 +231,7 @@ static int extract_header(AVCodecContext *const avctx,
         s->transparency = bytestream_get_be16(&buf);
         s->masking      = bytestream_get_byte(&buf);
         if (s->masking == MASK_HAS_MASK) {
-            if (s->bpp >= 8) {
+            if (s->bpp >= 8 && !s->ham) {
                 avctx->pix_fmt = AV_PIX_FMT_RGB32;
                 av_freep(&s->mask_buf);
                 av_freep(&s->mask_palbuf);



More information about the ffmpeg-cvslog mailing list