diff --git a/ChangeLog b/ChangeLog index 8b8d3f5423..89bd979b4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-05-19 Ronald S. Bultje + + * gst/playback/gstplaybasebin.c: (probe_triggered): + Fix missing unlock. + * gst/playback/gstplaybin.c: (add_sink): + First add, then link (otherwise pad link fails). + 2005-05-19 Zaheer Abbas Merali * examples/Makefile.am: diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index 4da8314767..dba17a5935 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -796,6 +796,9 @@ probe_triggered (GstProbe * probe, GstMiniObject ** data, gpointer user_data) * and continue, eventually the other streams will be EOSed and * we can switch out this group. */ GST_DEBUG ("group %p not completely muted", group); + + GROUP_UNLOCK (play_base_bin); + /* remove the EOS if we have something left */ return !have_left; } diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 2d89fe15b1..e7d5f1812d 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -689,6 +689,8 @@ add_sink (GstPlayBin * play_bin, GstElement * sink, GstPad * srcpad) GstPadLinkReturn res; GstElement *parent; + gst_bin_add (GST_BIN (play_bin), sink); + /* we found a sink for this stream, now try to install it */ sinkpad = gst_element_get_pad (sink, "sink"); res = gst_pad_link (srcpad, sinkpad); @@ -707,6 +709,8 @@ add_sink (GstPlayBin * play_bin, GstElement * sink, GstPad * srcpad) capsstr = gst_caps_to_string (gst_pad_get_caps (srcpad)); g_warning ("could not link %s", capsstr); g_free (capsstr); + + gst_bin_remove (GST_BIN (play_bin), sink); } else { /* we got the sink succesfully linked, now keep the sink * in out internal list */ @@ -714,7 +718,6 @@ add_sink (GstPlayBin * play_bin, GstElement * sink, GstPad * srcpad) gst_element_set_state (sink, (GST_STATE (play_bin) == GST_STATE_PLAYING) ? GST_STATE_PLAYING : GST_STATE_PAUSED); - gst_bin_add (GST_BIN (play_bin), sink); } return res;