summaryrefslogtreecommitdiffstats
path: root/gst/autodetect/gstautoaudiosink.c
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2005-10-04 17:58:40 +0000
committerMichael Smith <msmith@xiph.org>2005-10-04 17:58:40 +0000
commit84b9f118e7c56b3f33fafce19e65adb4659334e0 (patch)
treee6ac59e61ad4c25bba6c302fe884e5825d11832c /gst/autodetect/gstautoaudiosink.c
parent3ec9e676e764b773aedd1d50b01cbebe60c31c91 (diff)
gst/autodetect/: Set state of elements to NULL before removing from bins.
Original commit message from CVS: * gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_reset), (gst_auto_audio_sink_find_best), (gst_auto_audio_sink_detect): * gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_reset), (gst_auto_video_sink_find_best), (gst_auto_video_sink_detect): Set state of elements to NULL before removing from bins. Set state of test element to NULL if we failed to move it to READY
Diffstat (limited to 'gst/autodetect/gstautoaudiosink.c')
-rw-r--r--gst/autodetect/gstautoaudiosink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c
index a7b522a8..0bbf63a1 100644
--- a/gst/autodetect/gstautoaudiosink.c
+++ b/gst/autodetect/gstautoaudiosink.c
@@ -72,6 +72,7 @@ gst_auto_audio_sink_reset (GstAutoAudioSink * sink)
/* fakesink placeholder */
if (sink->kid) {
+ gst_element_set_state (sink->kid, GST_STATE_NULL);
gst_bin_remove (GST_BIN (sink), sink->kid);
}
sink->kid = gst_element_factory_make ("fakesink", "tempsink");
@@ -179,6 +180,8 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink)
GST_LOG ("This worked!");
choice = el;
goto done;
+ } else {
+ gst_element_set_state (el, GST_STATE_NULL);
}
}
@@ -205,6 +208,7 @@ gst_auto_audio_sink_detect (GstAutoAudioSink * sink)
GstPad *targetpad;
if (sink->kid) {
+ gst_element_set_state (sink->kid, GST_STATE_NULL);
gst_bin_remove (GST_BIN (sink), sink->kid);
sink->kid = NULL;
}