auto{audio,video}sink: Don't lose the GST_ELEMENT_IS_SINK flag after removing the...
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 9 Jun 2010 18:22:30 +0000 (20:22 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 9 Jun 2010 18:23:16 +0000 (20:23 +0200)
gst/autodetect/gstautoaudiosink.c
gst/autodetect/gstautovideosink.c

index b07ae038956393e60049f569e59bb672fbc3039f..fc731c4bbaf2dca2268c33aac80985cb78b184b1 100644 (file)
@@ -133,6 +133,8 @@ gst_auto_audio_sink_clear_kid (GstAutoAudioSink * sink)
     gst_element_set_state (sink->kid, GST_STATE_NULL);
     gst_bin_remove (GST_BIN (sink), sink->kid);
     sink->kid = NULL;
+    /* Don't lose the SINK flag */
+    GST_OBJECT_FLAG_SET (sink, GST_ELEMENT_IS_SINK);
   }
 }
 
index ed34b2f1cf03a5e9a1fa86a6b494b8a33b6d442c..299efa516d5b0b11c22e82a96f5264d21307c382 100644 (file)
@@ -130,6 +130,8 @@ gst_auto_video_sink_clear_kid (GstAutoVideoSink * sink)
     gst_element_set_state (sink->kid, GST_STATE_NULL);
     gst_bin_remove (GST_BIN (sink), sink->kid);
     sink->kid = NULL;
+    /* Don't lose the SINK flag */
+    GST_OBJECT_FLAG_SET (sink, GST_ELEMENT_IS_SINK);
   }
 }