X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-realmedia%2Fsrc%2Fdemuxers%2Fmod.rs;fp=nihav-realmedia%2Fsrc%2Fdemuxers%2Fmod.rs;h=820dd2eea79d102da70a53b36a5b2b15f8506603;hp=1b044a642f0a1643c051cf10efb5ce45d8d00cfd;hb=71d7f39706f0f5004820f8d1d36c87d5f9ec3e97;hpb=a970b2110488aeff5855743d1728ee83462e8306 diff --git a/nihav-realmedia/src/demuxers/mod.rs b/nihav-realmedia/src/demuxers/mod.rs index 1b044a6..820dd2e 100644 --- a/nihav-realmedia/src/demuxers/mod.rs +++ b/nihav-realmedia/src/demuxers/mod.rs @@ -1,8 +1,13 @@ use nihav_core::demuxers::*; +#[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_real")] #[allow(clippy::identity_op)]