]> git.nihav.org Git - nihav.git/blobdiff - src/detect.rs
Rust2018: use new addressing scheme
[nihav.git] / src / detect.rs
index 66b6a326b90bbf3b30cbc5d3e1a178b37b94ea66..0b606419b0c91f86b495482e56d0332e39d4de25 100644 (file)
@@ -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() {