From ec2f93e9d23aae0b62bddbd2178110562d5f266f Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Wed, 17 Oct 2007 11:47:23 +0000 Subject: Use new gst_bus_pop_filtered(). Original commit message from CVS: * ext/gconf/gstswitchsink.c: * gst/autodetect/gstautoaudiosink.c: Use new gst_bus_pop_filtered(). --- gst/autodetect/gstautoaudiosink.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gst/autodetect') diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c index c3dc052b..8ab5f407 100644 --- a/gst/autodetect/gstautoaudiosink.c +++ b/gst/autodetect/gstautoaudiosink.c @@ -235,13 +235,9 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink) } /* collect all error messages */ - while ((message = gst_bus_pop (bus))) { - if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) { - GST_DEBUG_OBJECT (sink, "error message %" GST_PTR_FORMAT, message); - errors = g_slist_append (errors, message); - } else { - gst_message_unref (message); - } + while ((message = gst_bus_pop_filtered (bus, GST_MESSAGE_ERROR))) { + GST_DEBUG_OBJECT (sink, "error message %" GST_PTR_FORMAT, message); + errors = g_slist_append (errors, message); } gst_element_set_state (el, GST_STATE_NULL); -- cgit