From 976d5045c671700b1e16ed2b98e746a67fa91e8b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 21 Nov 2008 20:27:30 +0100 Subject: decoder: check audio_format_valid() in all decoders Refuse to play audio formats which are not supported by MPD. --- src/decoder/aac_plugin.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/decoder/aac_plugin.c') diff --git a/src/decoder/aac_plugin.c b/src/decoder/aac_plugin.c index d372ce5b1..19a7d7c9c 100644 --- a/src/decoder/aac_plugin.c +++ b/src/decoder/aac_plugin.c @@ -405,6 +405,11 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream) .sample_rate = sample_rate, }; + if (!audio_format_valid(&audio_format)) { + g_warning("aac: invalid audio format\n"); + break; + } + decoder_initialized(mpd_decoder, &audio_format, false, totalTime); initialized = true; -- cgit v1.2.3