forked from mirrors/gstreamer-rs
validate: Do not check if initialized when initializing
🤦
This commit is contained in:
parent
1e24e2d133
commit
a341b4972f
1 changed files with 11 additions and 1 deletions
|
@ -4,9 +4,9 @@ use glib::translate::*;
|
||||||
|
|
||||||
#[doc(alias = "gst_validate_init")]
|
#[doc(alias = "gst_validate_init")]
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
assert_initialized_main_thread!();
|
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_validate_init();
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue