]> git.nihav.org Git - nihav.git/commitdiff
nihav-registry/detect: reorganise avi and avi-dib detection
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 21 Sep 2025 15:46:02 +0000 (17:46 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 21 Sep 2025 15:46:02 +0000 (17:46 +0200)
This is more important for the encoding.

nihav-registry/src/detect.rs

index 47468fb4998c6e2aec62952b29e03b5e92b71d34..63db8c4e7ccd11bd41f23ea26b09521a5f3b80c2 100644 (file)
@@ -198,14 +198,6 @@ struct DetectConditions<'a> {
 }
 
 const DETECTORS: &[DetectConditions] = &[
-    DetectConditions {
-        demux_name: "avi-dib",
-        extensions: ".avi",
-        conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"RIFF") },
-                      CheckItem{offs: 8, cond: &CC::Str(b"AVI LIST")},
-                      CheckItem{offs: 20, cond: &CC::Str(b"hdrlhdra")},
-                     ]
-    },
     DetectConditions {
         demux_name: "avi",
         extensions: ".avi",
@@ -213,6 +205,15 @@ const DETECTORS: &[DetectConditions] = &[
                       CheckItem{offs: 8, cond: &CC::Or(&CC::Or(&CC::Str(b"AVI LIST"),
                                                                &CC::Str(b"AVIXLIST")),
                                                                &CC::Str(b"ON2fLIST")) },
+                      CheckItem{offs: 20, cond: &CC::Str(b"hdrlavih")},
+                     ]
+    },
+    DetectConditions {
+        demux_name: "avi-dib",
+        extensions: ".avi",
+        conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"RIFF") },
+                      CheckItem{offs: 8, cond: &CC::Str(b"AVI LIST")},
+                      CheckItem{offs: 20, cond: &CC::Str(b"hdrlhdra")},
                      ]
     },
     DetectConditions {