gst/playback/gstdecodebin.c (try_to_link_1) set element to NULL before removing it.
authorAndy Wingo <wingo@pobox.com>
Sun, 2 Oct 2005 23:11:41 +0000 (23:11 +0000)
committerAndy Wingo <wingo@pobox.com>
Sun, 2 Oct 2005 23:11:41 +0000 (23:11 +0000)
Original commit message from CVS:
2005-10-03  Andy Wingo  <wingo@pobox.com>

* gst/playback/gstdecodebin.c (try_to_link_1)
(remove_element_chain): set element to NULL before removing it.

ChangeLog
gst/playback/gstdecodebin.c

index b89ea06..fcf1e19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-03  Andy Wingo  <wingo@pobox.com>
+
+       * gst/playback/gstdecodebin.c (try_to_link_1)
+       (remove_element_chain): set element to NULL before removing it.
+
 2005-10-02  Johan Dahlin  <johan@gnome.org>
 
        * ext/gnomevfs/gstgnomevfssrc.c (gst_gnomevfssrc_uri_get_protocols): 
index 79bc569..e29b94d 100644 (file)
@@ -601,6 +601,7 @@ try_to_link_1 (GstDecodeBin * decode_bin, GstPad * pad, GList * factories)
       gst_object_unref (sinkpad);
       /* this element did not work, remove it again and continue trying
        * other elements, the element will be disposed. */
+      gst_element_set_state (element, GST_STATE_NULL);
       gst_bin_remove (GST_BIN (decode_bin), element);
     } else {
       const gchar *klass;
@@ -764,6 +765,8 @@ remove_element_chain (GstDecodeBin * decode_bin, GstPad * pad)
 
   g_list_free (int_links);
 
+  gst_element_set_state (elem, GST_STATE_NULL);
+
   gst_bin_remove (GST_BIN (decode_bin), elem);
 }