Index: gst/playback/gstdecodebin.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstdecodebin.c,v
retrieving revision 1.72
diff -u -r1.72 gstdecodebin.c
--- gst/playback/gstdecodebin.c	11 May 2006 19:38:22 -0000	1.72
+++ gst/playback/gstdecodebin.c	13 May 2006 16:48:09 -0000
@@ -1386,6 +1386,7 @@
         if (element != decode_bin->typefind && element != decode_bin->fakesink) {
           GST_DEBUG_OBJECT (element, "removing autoplugged element");
           g_signal_handlers_disconnect_by_func (element, unlinked, decode_bin);
+          gst_element_set_state (element, GST_STATE_NULL);
           gst_bin_remove (GST_BIN (decode_bin), element);
         }
         gst_object_unref (element);
@@ -1472,8 +1473,8 @@
 
   switch (transition) {
     case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
       break;
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
     case GST_STATE_CHANGE_READY_TO_NULL:
       free_dynamics (decode_bin);
       free_pad_probes (decode_bin);
