play: Flush API bus before exiting main loop

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>
This commit is contained in:
Philippe Normand 2020-12-07 09:56:26 +00:00
parent fae7c8dd7e
commit f009802771

View 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);