From faab0b755af9ceb92b2f80b6a9654a670cf38f19 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Fri, 13 Mar 2015 22:39:52 +0100 Subject: [PATCH] audio: Filter for messages we care about, rest will be dropped --- mopidy/audio/scan.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mopidy/audio/scan.py b/mopidy/audio/scan.py index cbf4c170..3880d91a 100644 --- a/mopidy/audio/scan.py +++ b/mopidy/audio/scan.py @@ -125,9 +125,12 @@ def _process(pipeline, timeout_ms): timeout = timeout_ms * gst.MSECOND tags, mime, missing_description = {}, None, None + types = (gst.MESSAGE_ELEMENT | gst.MESSAGE_APPLICATION | gst.MESSAGE_ERROR + | gst.MESSAGE_EOS | gst.MESSAGE_ASYNC_DONE | gst.MESSAGE_TAG) + start = clock.get_time() while timeout > 0: - message = bus.timed_pop(timeout) + message = bus.timed_pop_filtered(timeout, types) if message is None: break