avcodec/tiff: Support uncompressed G4 CCITT fax
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 13 Aug 2015 14:11:23 +0000 (16:11 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 13 Aug 2015 14:33:36 +0000 (16:33 +0200)
Fixes part of ticket700

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/tiff.c

index d5584a5..55ec0ac 100644 (file)
@@ -460,7 +460,7 @@ static int tiff_unpack_fax(TiffContext *s, uint8_t *dst, int stride,
                "Error allocating temporary buffer\n");
         return AVERROR(ENOMEM);
     }
-    if (s->fax_opts & 2) {
+    if ((s->fax_opts & 2) && s->compr == TIFF_G3) {
         avpriv_request_sample(s->avctx, "Uncompressed fax mode");
         av_free(src2);
         return AVERROR_PATCHWELCOME;