X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-vivo%2Fsrc%2Fdemuxers%2Fmod.rs;h=145dafc277893e9585a82fa122485f78f885f956;hb=a9b33d5ed7282ae4d069c225df9827581c47b4d9;hp=c76f1062bf8e7d67b91e8ed99b8ca2d9d0437369;hpb=31cf33aceca7798294e1ce5c01702ef5e6ef7adc;p=nihav.git diff --git a/nihav-vivo/src/demuxers/mod.rs b/nihav-vivo/src/demuxers/mod.rs index c76f106..145dafc 100644 --- a/nihav-vivo/src/demuxers/mod.rs +++ b/nihav-vivo/src/demuxers/mod.rs @@ -2,14 +2,19 @@ use nihav_core::demuxers::*; #[allow(unused_macros)] +#[cfg(debug_assertions)] macro_rules! validate { ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DemuxerError::InvalidData); } }; } +#[cfg(not(debug_assertions))] +macro_rules! validate { + ($a:expr) => { if !$a { return Err(DemuxerError::InvalidData); } }; +} #[cfg(feature="demuxer_vivo")] mod vivo; -const DEMUXERS: &[&DemuxerCreator] = &[ +const DEMUXERS: &[&dyn DemuxerCreator] = &[ #[cfg(feature="demuxer_vivo")] &vivo::VivoDemuxerCreator {}, ];