From 7e25b4fd84b07b76e022bd478ed86a6b752cc1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Sep 2019 13:11:33 +0300 Subject: [PATCH] togglerecord: Use Bus::add_watch_local() for simplification --- gst-plugin-togglerecord/examples/gtk_recording.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-plugin-togglerecord/examples/gtk_recording.rs b/gst-plugin-togglerecord/examples/gtk_recording.rs index ff87f512..c77b4a51 100644 --- a/gst-plugin-togglerecord/examples/gtk_recording.rs +++ b/gst-plugin-togglerecord/examples/gtk_recording.rs @@ -301,8 +301,8 @@ fn create_ui(app: >k::Application) { }); let bus = pipeline.get_bus().unwrap(); - let app_weak = glib::SendWeakRef::from(app.downgrade()); - bus.add_watch(move |_, msg| { + let app_weak = app.downgrade(); + bus.add_watch_local(move |_, msg| { use gst::MessageView; let app = match app_weak.upgrade() {