From 465a740bbf5b569251ecfb4d4ebd301b0120b2ca Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 25 May 2007 10:23:49 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ gst/autodetect/gstautoaudiosink.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 84c7648c39..f883165de2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-05-25 Jan Schmidt + + * 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 + 2007-05-24 Tim-Philipp Müller * ext/flac/gstflacenc.c: (gst_flac_enc_sink_setcaps), diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c index 3920a33dba..c3dc052b6b 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 */