From 9ab6ab42572a28e447f761485c457f2a71eabb86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 10 Jul 2013 17:16:14 +0200 Subject: [PATCH] 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 --- gst/playback/gstplaybin2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 3d7b147d70..f3d8c75f7b 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -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)