Commit 9ab6ab42 authored by Sebastian Dröge's avatar Sebastian Dröge

playbin: Only give sinks a new bus if they have no parent yet

Otherwise we will remove the bus that would proxy messages to playsink
and never set it again. If the sink is already in playsink, all failures
are fatal anyway as it's either a sink that worked before or one that
was set by the user.

https://bugzilla.gnome.org/show_bug.cgi?id=701997
parent d7f1d995
......@@ -4006,10 +4006,12 @@ activate_sink (GstPlayBin * playbin, GstElement * sink, gboolean * activated)
gst_context_unref (context);
}
bus = gst_bus_new ();
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) activate_sink_bus_handler,
playbin, NULL);
gst_element_set_bus (sink, bus);
if (!GST_OBJECT_PARENT (sink)) {
bus = gst_bus_new ();
gst_bus_set_sync_handler (bus,
(GstBusSyncHandler) activate_sink_bus_handler, playbin, NULL);
gst_element_set_bus (sink, bus);
}
sret = gst_element_set_state (sink, GST_STATE_READY);
if (sret == GST_STATE_CHANGE_FAILURE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment