fixed a double-unreffing problem when disposing of elements
authorAndy Wingo <wingo@pobox.com>
Sat, 24 Nov 2001 02:49:54 +0000 (02:49 +0000)
committerAndy Wingo <wingo@pobox.com>
Sat, 24 Nov 2001 02:49:54 +0000 (02:49 +0000)
Original commit message from CVS:
fixed a double-unreffing problem when disposing of elements

gst/gstelement.c

index d1f3139..e7597af 100644 (file)
@@ -963,7 +963,8 @@ gst_element_dispose (GObject *object)
     orig = pads = g_list_copy (element->pads);
     while (pads) {
       pad = GST_PAD (pads->data);
-      gst_object_unref (GST_OBJECT (pad));
+      // the gst_object_unparent will do the unreffing
+      gst_element_remove_pad(element, pad);
       pads = g_list_next (pads);
     }
     g_list_free (orig);