summaryrefslogtreecommitdiffstats
path: root/gst/autodetect/gstautoaudiosink.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/autodetect/gstautoaudiosink.c')
-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);