Make TIFF decoder load compression options only for corresponding codec
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 28 Sep 2009 05:15:27 +0000 (05:15 +0000)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 28 Sep 2009 05:15:27 +0000 (05:15 +0000)
Originally committed as revision 20064 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/tiff.c

index c4f4523..536b74f 100644 (file)
@@ -437,8 +437,12 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
         }
         break;
     case TIFF_T4OPTIONS:
+        if(s->compr == TIFF_G3)
+            s->fax_opts = value;
+        break;
     case TIFF_T6OPTIONS:
-        s->fax_opts = value;
+        if(s->compr == TIFF_G4)
+            s->fax_opts = value;
         break;
     }
     return 0;