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
This commit is contained in:
Sebastian Dröge 2013-07-10 17:16:14 +02:00
parent d7f1d9954f
commit 9ab6ab4257

View file

@ -4006,10 +4006,12 @@ activate_sink (GstPlayBin * playbin, GstElement * sink, gboolean * activated)
gst_context_unref (context);
}
if (!GST_OBJECT_PARENT (sink)) {
bus = gst_bus_new ();
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) activate_sink_bus_handler,
playbin, NULL);
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)