summaryrefslogtreecommitdiffstats
path: root/ext/gconf
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 /ext/gconf
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 'ext/gconf')
-rw-r--r--ext/gconf/gstswitchsink.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/gconf/gstswitchsink.c b/ext/gconf/gstswitchsink.c
index bc09f942..d8da2ae0 100644
--- a/ext/gconf/gstswitchsink.c
+++ b/ext/gconf/gstswitchsink.c
@@ -165,13 +165,10 @@ gst_switch_commit_new_kid (GstSwitchSink * sink)
/* check if child posted an error message and if so re-post it on our bus
* so that the application gets to see a decent error and not our generic
* fallback error message which is completely indecipherable to the user */
- while ((msg = gst_bus_pop (GST_ELEMENT_BUS (new_kid)))) {
- if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
- GST_INFO_OBJECT (sink, "Forwarding kid error: %" GST_PTR_FORMAT, msg);
- gst_element_post_message (GST_ELEMENT (sink), msg);
- break;
- }
- gst_message_unref (msg);
+ msg = gst_bus_pop_filtered (GST_ELEMENT_BUS (new_kid), GST_MESSAGE_ERROR);
+ if (msg) {
+ GST_INFO_OBJECT (sink, "Forwarding kid error: %" GST_PTR_FORMAT, msg);
+ gst_element_post_message (GST_ELEMENT (sink), msg);
}
/* FIXME: need a translated error message that tells the user to check
* her GConf audio/video settings */