]> git.nihav.org Git - nihav.git/blobdiff - nihav-rad/src/codecs/mod.rs
binkvid: move data tables into separate module
[nihav.git] / nihav-rad / src / codecs / mod.rs
index a11f5c536563b4c04e8c76fdc9258159bcaea809..977324c1f47e2009ad3d10bb518595f80862b406 100644 (file)
@@ -1,8 +1,13 @@
 use nihav_core::codecs::*;
 
+#[cfg(debug_assertions)]
 macro_rules! validate {
     ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } };
 }
+#[cfg(not(debug_assertions))]
+macro_rules! validate {
+    ($a:expr) => { if !$a { return Err(DecoderError::InvalidData); } };
+}
 
 #[cfg(any(feature="decoder_smkaud", feature="decoder_smkvid"))]
 mod smacker;
@@ -10,6 +15,8 @@ mod smacker;
 mod binkaud;
 #[cfg(feature="decoder_binkvid")]
 mod binkvid;
+#[cfg(feature="decoder_binkvid")]
+mod binkviddata;
 #[cfg(feature="decoder_bink2")]
 mod bink2;
 
@@ -31,6 +38,6 @@ const RAD_CODECS: &[DecoderInfo] = &[
 /// Registers all available codecs provided by this crate.
 pub fn rad_register_all_decoders(rd: &mut RegisteredDecoders) {
     for decoder in RAD_CODECS.iter() {
-        rd.add_decoder(decoder.clone());
+        rd.add_decoder(*decoder);
     }
 }