[FFmpeg-devel] [PATCH] iff: decode HAM8 images with masking correctly

Peter Ross pross at xvid.org
Sun Nov 18 09:12:55 CET 2012


Fixes ticket #967.

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

diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index dfcca09..43e44e9 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);
-- 
1.7.10.4

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121118/f68c75a8/attachment.asc>


More information about the ffmpeg-devel mailing list