summaryrefslogtreecommitdiffstats
path: root/gst/autodetect
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2007-10-17 11:47:23 +0000
committerTim-Philipp Müller <tim@centricular.net>2007-10-17 11:47:23 +0000
commitec2f93e9d23aae0b62bddbd2178110562d5f266f (patch)
tree2c394550c682e8f63c88ea10575a8a9b9a07be99 /gst/autodetect
parenta769e5e70a3ed96d2df52a10aa18b42ca15b40a4 (diff)
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().
Diffstat (limited to 'gst/autodetect')
-rw-r--r--gst/autodetect/gstautoaudiosink.c10
1 files changed, 3 insertions, 7 deletions
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);