uridecodebin: fix leak when the source fails to change state
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 23 Jun 2009 14:10:37 +0000 (15:10 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 23 Jun 2009 14:12:50 +0000 (15:12 +0100)
gst/playback/gsturidecodebin.c

index aa5adf0..6effdaa 100644 (file)
@@ -1901,6 +1901,12 @@ gst_uri_decode_bin_change_state (GstElement * element,
       remove_source (decoder);
       do_async_done (decoder);
       break;
+    case GST_STATE_CHANGE_READY_TO_NULL:
+      GST_DEBUG ("ready to null");
+      remove_decoders (decoder);
+      remove_pads (decoder);
+      remove_source (decoder);
+      break;
     default:
       break;
   }