gst/playback/gstplaybin.c: Unlink manually since sometimes bin disposal (and therefore pad unlinking) is delayed, whi...

Original commit message from CVS:
* gst/playback/gstplaybin.c: (remove_sinks), (setup_sinks):
Unlink manually since sometimes bin disposal (and therefore
pad unlinking) is delayed, which will cause a new media file
to not be able to start playing instantly.
This commit is contained in:
Ronald S. Bultje 2004-12-01 13:14:57 +00:00
parent a818da90ad
commit 946ce9b49a
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2004-12-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybin.c: (remove_sinks), (setup_sinks):
Unlink manually since sometimes bin disposal (and therefore
pad unlinking) is delayed, which will cause a new media file
to not be able to start playing instantly.
2004-11-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gststreaminfo.c: (stream_info_mute_pad):

View file

@ -606,8 +606,11 @@ remove_sinks (GstPlayBin * play_bin)
for (sinks = play_bin->sinks; sinks; sinks = g_list_next (sinks)) {
GstElement *element = GST_ELEMENT (sinks->data);
GstPad *pad = gst_element_get_pad (element, "sink");
GST_LOG ("removing sink %p", element);
if (GST_PAD_PEER (pad))
gst_pad_unlink (GST_PAD_PEER (pad), pad);
gst_bin_remove (GST_BIN (play_bin), element);
}
g_list_free (play_bin->sinks);
@ -741,6 +744,7 @@ setup_sinks (GstPlayBaseBin * play_base_bin)
GST_STATE (sink), GST_STATE (play_bin),
GST_STATE (gst_pad_get_parent (srcpad)));
sinkpad = gst_element_get_pad (sink, "sink");
/* try to link the pad of the sink to the stream */
res = gst_pad_link (srcpad, sinkpad);
if (!res) {