aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-17 17:08:56 +0100
committerMax Kellermann <max@duempel.org>2010-01-17 17:09:10 +0100
commit9d4b7ab11305d8a95fcf93ffaedf0bdea0356927 (patch)
tree4339db83b17280d9a1eb3b69cb72f3c380dba9cc /src
parent8ac776c58b69a94fce793d16e477a88207ce0d27 (diff)
downloadmpd-9d4b7ab11305d8a95fcf93ffaedf0bdea0356927.tar.gz
mpd-9d4b7ab11305d8a95fcf93ffaedf0bdea0356927.tar.xz
mpd-9d4b7ab11305d8a95fcf93ffaedf0bdea0356927.zip
decoder_thread: don't fall back to "mad" unless no plugin matches
When all plugins have failed, MPD used to fall back to the "mad" decoder plugin, to handle those radio streams without a Content-Type response header. This however leads to unexpected results (garbage being played) when the stream isn't really mp3. Since we care little about "bad" streams, we shouldn't have hacks which have bad side effects. Let's get rid of this hack now! Only try to "mad" plugin if there was no match at all (Content-Type, path suffix) and no other plugin has been tried.
Diffstat (limited to 'src')
-rw-r--r--src/decoder_thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index 631a7a0e3..42a537ffe 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -282,7 +282,8 @@ decoder_run_stream(struct decoder *decoder, const char *uri)
&tried) ||
/* fallback to mp3: this is needed for bastard streams
that don't have a suffix or set the mimeType */
- decoder_run_stream_fallback(decoder, input_stream);
+ (tried == NULL &&
+ decoder_run_stream_fallback(decoder, input_stream));
g_slist_free(tried);