play: Flush API bus before exiting main loop
authorPhilippe Normand <philn@igalia.com>
Mon, 7 Dec 2020 09:56:26 +0000 (09:56 +0000)
committerPhilippe Normand <philn@igalia.com>
Tue, 9 Mar 2021 18:03:48 +0000 (18:03 +0000)
Otherwise the bus might attempt to dispatch queued messages after the thread
ended, causing runtime warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>

gst-libs/gst/play/gstplay.c

index 6229439..ed33dff 100644 (file)
@@ -445,6 +445,8 @@ gst_play_dispose (GObject * object)
 
   GST_TRACE_OBJECT (self, "Stopping main thread");
 
+  gst_bus_set_flushing (self->api_bus, TRUE);
+
   if (self->loop) {
     g_main_loop_quit (self->loop);