From: Kostya Shishkov Date: Sun, 21 Sep 2025 15:46:02 +0000 (+0200) Subject: nihav-registry/detect: reorganise avi and avi-dib detection X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=83a4b01b46e505afeeecd55a90ac9361e949defb;p=nihav.git nihav-registry/detect: reorganise avi and avi-dib detection This is more important for the encoding. --- diff --git a/nihav-registry/src/detect.rs b/nihav-registry/src/detect.rs index 47468fb..63db8c4 100644 --- a/nihav-registry/src/detect.rs +++ b/nihav-registry/src/detect.rs @@ -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 {