From 1b8dd847b1e00631c537a15cee26a5ba1628ca2a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 7 Apr 2006 17:18:11 +0000 Subject: [PATCH] gst/playback/gstplaybasebin.c: Clean up our group elements properly in the case where it never got committed - it sti... Original commit message from CVS: * gst/playback/gstplaybasebin.c: (group_destroy): Clean up our group elements properly in the case where it never got committed - it still got added unconditionally to the bin. --- ChangeLog | 6 ++++++ gst/playback/gstplaybasebin.c | 20 +++++++------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fce3fba77..7514f94038 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-07 Jan Schmidt + + * gst/playback/gstplaybasebin.c: (group_destroy): + Clean up our group elements properly in the case where it never + got committed - it still got added unconditionally to the bin. + 2006-04-07 Wim Taymans * ext/theora/theoradec.c: (theora_dec_sink_event), diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index c69a3a4721..e1cc6394fb 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -340,19 +340,13 @@ group_destroy (GstPlayBaseGroup * group) /* if the group is currently being played, we have to remove the element * from the thread */ - if (get_active_group (play_base_bin) == group) { - GST_LOG ("removing preroll element %s", GST_ELEMENT_NAME (element)); - gst_element_set_state (element, GST_STATE_NULL); - gst_element_set_state (group->type[n].selector, GST_STATE_NULL); - gst_bin_remove (group->type[n].bin, element); - gst_bin_remove (group->type[n].bin, group->type[n].selector); - } else { - /* else we can just unref it */ - gst_element_set_state (element, GST_STATE_NULL); - gst_element_set_state (group->type[n].selector, GST_STATE_NULL); - gst_object_unref (element); - gst_object_unref (group->type[n].selector); - } + gst_element_set_state (element, GST_STATE_NULL); + gst_element_set_state (group->type[n].selector, GST_STATE_NULL); + + GST_LOG ("removing preroll element %s", GST_ELEMENT_NAME (element)); + + gst_bin_remove (group->type[n].bin, element); + gst_bin_remove (group->type[n].bin, group->type[n].selector); group->type[n].preroll = NULL; group->type[n].selector = NULL;