gst/playback/gstplaybasebin.c: Fix missing unlock.

Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (probe_triggered):
Fix missing unlock.
* gst/playback/gstplaybin.c: (add_sink):
First add, then link (otherwise pad link fails).
This commit is contained in:
Ronald S. Bultje 2005-05-19 15:37:42 +00:00
parent 33ab9a69d4
commit a87b7cb41b
3 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2005-05-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* 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 <zaheerabbas at merali dot org>
* examples/Makefile.am:

View file

@ -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;
}

View file

@ -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;