validate: Do not check if initialized when initializing

🤦
This commit is contained in:
Thibault Saunier 2022-08-26 11:21:15 -04:00
parent 1e24e2d133
commit a341b4972f

View file

@ -4,9 +4,9 @@ use glib::translate::*;
#[doc(alias = "gst_validate_init")]
pub fn init() {
assert_initialized_main_thread!();
unsafe {
ffi::gst_validate_init();
crate::INITIALIZED.store(true, std::sync::atomic::Ordering::SeqCst);
}
}
@ -28,3 +28,13 @@ pub fn setup_test_file(test_file: &str, use_fakesinks: bool) -> gst::Structure {
))
}
}
#[cfg(test)]
mod tests {
#[test]
fn test_init() {
gst::init().unwrap();
crate::init();
}
}