avcodec/exr : add support for long name flag and be more explicit about unsupported...
authorMartin Vignali <martin.vignali@gmail.com>
Sat, 17 Feb 2018 19:44:12 +0000 (20:44 +0100)
committerMartin Vignali <martin.vignali@gmail.com>
Sat, 24 Feb 2018 20:42:04 +0000 (21:42 +0100)
based-on patch by Carl Eugen Hoyos

Fix ticket 6994

libavcodec/exr.c

index 47f59bd..444af17 100644 (file)
@@ -1350,12 +1350,14 @@ static int decode_header(EXRContext *s, AVFrame *frame)
 
     flags = bytestream2_get_le24(&s->gb);
 
-    if (flags == 0x00)
-        s->is_tile = 0;
-    else if (flags & 0x02)
+    if (flags & 0x02)
         s->is_tile = 1;
-    else{
-        avpriv_report_missing_feature(s->avctx, "flags %d", flags);
+    if (flags & 0x08) {
+        avpriv_report_missing_feature(s->avctx, "deep data");
+        return AVERROR_PATCHWELCOME;
+    }
+    if (flags & 0x10) {
+        avpriv_report_missing_feature(s->avctx, "multipart");
         return AVERROR_PATCHWELCOME;
     }