Return gst::BusSyncReply::Drop from the bus sync handler in the Rust sendrecv example
authorSebastian Dröge <sebastian@centricular.com>
Thu, 24 Oct 2019 23:02:59 +0000 (02:02 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 24 Oct 2019 23:02:59 +0000 (02:02 +0300)
Otherwise all messages accumulate on the queue inside the bus and
nothing is ever removing them from there.

We handle messages elsewhere and only intercept them from the sync
handler.

webrtc/sendrecv/gst-rust/src/main.rs

index 83dfe3e..01e8e5f 100644 (file)
@@ -819,7 +819,7 @@ fn main() {
                 let send_gst_msg_tx = Mutex::new(send_gst_msg_tx);
                 bus.set_sync_handler(move |_, msg| {
                     let _ = send_gst_msg_tx.lock().unwrap().try_send(msg.clone());
-                    gst::BusSyncReply::Pass
+                    gst::BusSyncReply::Drop
                 });
 
                 // Create our application control logic