mov: add support for MacBinary format
[nihav.git] / nihav-registry / src / detect.rs
index bfe1d44a301656edf49b7d977996d581c2107517..bb452b2a69a8cec0fdea24f625554417ebd6a0de 100644 (file)
@@ -230,6 +230,15 @@ const DETECTORS: &[DetectConditions] = &[
                                                                 &CC::Str(b"moov")),
                                                                 &CC::Str(b"ftyp")) }],
     },
+    DetectConditions {
+        demux_name: "mov-macbin",
+        extensions: ".mov,.bin",
+        conditions: &[CheckItem{offs: 0, cond: &CC::Eq(Arg::Byte(0))},
+                      CheckItem{offs: 0x41, cond: &CC::Str(b"MooV")},
+                      CheckItem{offs: 0x7A, cond: &CC::Eq(Arg::Byte(0x81))},
+                      CheckItem{offs: 0x7B, cond: &CC::Eq(Arg::Byte(0x81))},
+                      CheckItem{offs: 0x84, cond: &CC::Str(b"mdat")}],
+    },
     DetectConditions {
         demux_name: "yuv4mpeg",
         extensions: ".y4m",