summaryrefslogtreecommitdiffstats
path: root/gst/autodetect
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2007-05-25 10:23:49 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2007-05-25 10:23:49 +0000
commit465a740bbf5b569251ecfb4d4ebd301b0120b2ca (patch)
tree78783546dafc43d58eeda9fcb13b84ef062f7399 /gst/autodetect
parentd2977ff4eba46efb99930f89614c1105a2ebc1af (diff)
gst/autodetect/gstautoaudiosink.c: Don't unnecessarily perform a READY->NULL->READY transition on the detected audio ...
Original commit message from CVS: * gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_detect): Don't unnecessarily perform a READY->NULL->READY transition on the detected audio sink when starting up. Fixes: #440127
Diffstat (limited to 'gst/autodetect')
-rw-r--r--gst/autodetect/gstautoaudiosink.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c
index 3920a33d..c3dc052b 100644
--- a/gst/autodetect/gstautoaudiosink.c
+++ b/gst/autodetect/gstautoaudiosink.c
@@ -290,7 +290,12 @@ gst_auto_audio_sink_detect (GstAutoAudioSink * sink)
}
sink->kid = esink;
- gst_element_set_state (sink->kid, GST_STATE (sink));
+ /* Ensure the child is brought up to the right state to match the parent
+ * although it's currently always in READY and
+ * we're always doing NULL->READY. */
+ if (GST_STATE (sink->kid) < GST_STATE (sink))
+ gst_element_set_state (sink->kid, GST_STATE (sink));
+
gst_bin_add (GST_BIN (sink), esink);
/* attach ghost pad */