tiff: Return proper error for missing LZMA compression
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>
Mon, 18 Aug 2014 08:27:49 +0000 (09:27 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 18 Aug 2014 12:23:24 +0000 (14:23 +0200)
The LZMA support is a semi-official extension supported by libtiff 4.0.0
and later.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/tiff.c
libavcodec/tiff.h

index ca5ec75..3b2fc7d 100644 (file)
@@ -408,6 +408,9 @@ static int tiff_decode_tag(TiffContext *s)
         case TIFF_NEWJPEG:
             avpriv_report_missing_feature(s->avctx, "JPEG compression");
             return AVERROR_PATCHWELCOME;
+        case TIFF_LZMA:
+            avpriv_report_missing_feature(s->avctx, "LZMA compression");
+            return AVERROR_PATCHWELCOME;
         default:
             av_log(s->avctx, AV_LOG_ERROR, "Unknown compression method %i\n",
                    s->compr);
index 8a3f7f7..68ac695 100644 (file)
@@ -71,7 +71,8 @@ enum TiffCompr {
     TIFF_NEWJPEG,
     TIFF_ADOBE_DEFLATE,
     TIFF_PACKBITS = 0x8005,
-    TIFF_DEFLATE  = 0x80B2
+    TIFF_DEFLATE  = 0x80B2,
+    TIFF_LZMA     = 0x886D,
 };
 
 enum TiffTypes {