X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-rad%2Fsrc%2Fdemuxers%2Fmod.rs;h=65ddf2cffaf93fca04887b23b7bf0c5a24a0943f;hb=71d7f39706f0f5004820f8d1d36c87d5f9ec3e97;hp=b1969649a1e8b0e8c89b3ac79f47b1756013b90e;hpb=ac818eac7671fa8ddfea5aa4fb86fc0b5ab82d2e;p=nihav.git diff --git a/nihav-rad/src/demuxers/mod.rs b/nihav-rad/src/demuxers/mod.rs index b196964..65ddf2c 100644 --- a/nihav-rad/src/demuxers/mod.rs +++ b/nihav-rad/src/demuxers/mod.rs @@ -1,9 +1,14 @@ 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_smk")] mod smacker;