decoder: check audio_format_valid() in all decoders

Refuse to play audio formats which are not supported by MPD.
This commit is contained in:
Max Kellermann
2008-11-21 20:27:30 +01:00
parent be9e60d55e
commit 976d5045c6
10 changed files with 71 additions and 7 deletions

View File

@@ -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;