X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-commonfmt%2Fsrc%2Fdemuxers%2Fmod.rs;h=32fe113cd4e07097cd08bb028048df79ae05bc2d;hb=HEAD;hp=d850e05da1bede7e307aa55ffcf04bbb6c4ba7ff;hpb=88fd1059c144439b922c31baa61fcf3e93f608f0;p=nihav.git diff --git a/nihav-commonfmt/src/demuxers/mod.rs b/nihav-commonfmt/src/demuxers/mod.rs index d850e05..42d1f11 100644 --- a/nihav-commonfmt/src/demuxers/mod.rs +++ b/nihav-commonfmt/src/demuxers/mod.rs @@ -2,13 +2,20 @@ 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_avi")] #[allow(clippy::cast_lossless)] mod avi; +#[cfg(feature="demuxer_gif")] +mod gif; #[cfg(feature="demuxer_mov")] #[allow(clippy::cast_lossless)] mod mov; @@ -20,6 +27,8 @@ mod y4m; const DEMUXERS: &[&dyn DemuxerCreator] = &[ #[cfg(feature="demuxer_avi")] &avi::AVIDemuxerCreator {}, +#[cfg(feature="demuxer_gif")] + &gif::GIFDemuxerCreator {}, #[cfg(feature="demuxer_mov")] &mov::MOVDemuxerCreator {}, #[cfg(feature="demuxer_mov")]