diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 4c4e38f9f..b81e5138a 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -271,6 +271,7 @@ impl AppSink { /// /// This method returns an instance of [`AppSinkBuilder`](crate::builders::AppSinkBuilder) which can be used to create [`AppSink`] objects. pub fn builder() -> AppSinkBuilder { + assert_initialized_main_thread!(); AppSinkBuilder::default() } diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 2b04f179c..fd9e0fded 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -216,6 +216,7 @@ impl AppSrc { /// /// This method returns an instance of [`AppSrcBuilder`](crate::builders::AppSrcBuilder) which can be used to create [`AppSrc`] objects. pub fn builder() -> AppSrcBuilder { + assert_initialized_main_thread!(); AppSrcBuilder::default() }