togglerecord: Use Bus::add_watch_local() for simplification

This commit is contained in:
Sebastian Dröge 2019-09-18 13:11:33 +03:00 committed by Sebastian Dröge
parent 3af5552e10
commit 7e25b4fd84

View file

@ -301,8 +301,8 @@ fn create_ui(app: &gtk::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() {