mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
gst/playback/gstplaybasebin.c: Remove hack to get rid of assert and get rid of unlinked signals properly.
Original commit message from CVS: * gst/playback/gstplaybasebin.c: (group_destroy): Remove hack to get rid of assert and get rid of unlinked signals properly.
This commit is contained in:
parent
7506b79230
commit
2ad3dc3e48
2 changed files with 17 additions and 17 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/playback/gstplaybasebin.c: (group_destroy):
|
||||
Remove hack to get rid of assert and get rid of unlinked
|
||||
signals properly.
|
||||
|
||||
2005-01-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/playback/gstplaybasebin.c: (setup_source):
|
||||
|
|
|
@ -294,42 +294,36 @@ group_destroy (GstPlayBaseGroup * group)
|
|||
/* remove the preroll queues */
|
||||
for (n = 0; n < NUM_TYPES; n++) {
|
||||
GstElement *element = group->type[n].preroll;
|
||||
GstPad *pad;
|
||||
guint sig_id;
|
||||
GstElement *fakesrc;
|
||||
const GList *item;
|
||||
|
||||
if (!element)
|
||||
continue;
|
||||
|
||||
/* have to unlink the unlink handler first because else we
|
||||
* are going to link an element in the finalize handler */
|
||||
pad = gst_element_get_pad (element, "sink");
|
||||
sig_id =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pad), "unlinked_id"));
|
||||
|
||||
if (sig_id != 0) {
|
||||
GST_LOG ("removing unlink signal %s:%s", GST_DEBUG_PAD_NAME (pad));
|
||||
g_signal_handler_disconnect (G_OBJECT (pad), sig_id);
|
||||
g_object_set_data (G_OBJECT (pad), "unlinked_id", GINT_TO_POINTER (0));
|
||||
}
|
||||
|
||||
/* remove any fakesrc elements for this preroll element */
|
||||
for (item = gst_element_get_pad_list (group->type[n].selector);
|
||||
item != NULL; item = item->next) {
|
||||
GstPad *pad = item->data;
|
||||
GstPad *pad = GST_PAD (item->data);
|
||||
guint sig_id;
|
||||
|
||||
if (GST_PAD_DIRECTION (pad) != GST_PAD_SINK)
|
||||
continue;
|
||||
|
||||
sig_id =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pad), "unlinked_id"));
|
||||
|
||||
if (sig_id != 0) {
|
||||
GST_LOG ("removing unlink signal %s:%s", GST_DEBUG_PAD_NAME (pad));
|
||||
g_signal_handler_disconnect (G_OBJECT (pad), sig_id);
|
||||
g_object_set_data (G_OBJECT (pad), "unlinked_id", GINT_TO_POINTER (0));
|
||||
}
|
||||
|
||||
fakesrc = (GstElement *) g_object_get_data (G_OBJECT (pad), "fakesrc");
|
||||
if (fakesrc != NULL) {
|
||||
GST_LOG ("removing fakesrc from %s:%s",
|
||||
gst_pad_get_name (pad),
|
||||
GST_ELEMENT_NAME (gst_pad_get_parent (pad)));
|
||||
gst_bin_remove (GST_BIN (play_base_bin->thread), fakesrc);
|
||||
} else if (GST_PAD_PEER (pad)) {
|
||||
gst_pad_unlink (GST_PAD_PEER (pad), pad);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue