X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=src%2Fdetect.rs;h=0b606419b0c91f86b495482e56d0332e39d4de25;hb=aca8904163fb0a2bed0f5939097ddec3654d0551;hp=66b6a326b90bbf3b30cbc5d3e1a178b37b94ea66;hpb=ce52b3b5f57c73d8d55373e635c383f4403e04a7;p=nihav.git diff --git a/src/detect.rs b/src/detect.rs index 66b6a32..0b60641 100644 --- a/src/detect.rs +++ b/src/detect.rs @@ -1,5 +1,5 @@ use std::io::SeekFrom; -use io::byteio::ByteReader; +use crate::io::byteio::ByteReader; #[derive(Debug,Clone,Copy,PartialEq)] pub enum DetectionScore { @@ -185,7 +185,7 @@ const DETECTORS: &[DetectConditions] = &[ DetectConditions { demux_name: "realmedia", extensions: ".rm,.rmvb,.rma,.ra,.ram", - conditions: &[CheckItem{offs: 0, cond: &CC::Str(b".RMF")}, + conditions: &[CheckItem{offs: 0, cond: &CC::Or(&CC::Str(b".RMF"), &CC::Str(b".RMP")) }, CheckItem{offs: 4, cond: &CC::Ge(Arg::U32BE(10))}], }, DetectConditions { @@ -242,7 +242,7 @@ pub fn detect_format(name: &str, src: &mut ByteReader) -> Option<(&'static str, mod test { use super::*; use std::fs::File; - use io::byteio::*; + use crate::io::byteio::*; #[test] fn test_avi_detect() {