some object cleanup fixes

Original commit message from CVS:
some object cleanup fixes
This commit is contained in:
Andy Wingo 2002-02-17 19:58:29 +00:00
parent 7e7cf82d70
commit 92eb128d0f
2 changed files with 5 additions and 0 deletions

View file

@ -654,6 +654,9 @@ gst_bin_dispose (GObject * object)
GST_DEBUG (GST_CAT_REFCOUNTING, "dispose\n");
if (gst_element_get_state (GST_ELEMENT (object)) == GST_STATE_PLAYING)
gst_element_set_state (GST_ELEMENT (object), GST_STATE_PAUSED);
if (bin->children) {
orig = children = g_list_copy (bin->children);
while (children) {

View file

@ -1374,6 +1374,8 @@ gst_element_dispose (GObject *object)
GST_DEBUG_ELEMENT (GST_CAT_REFCOUNTING, element, "dispose\n");
gst_element_set_state (element, GST_STATE_NULL);
/* first we break all our connections with the ouside */
if (element->pads) {
GList *orig;