From 4590a98f0eb9484e185e7e0c25a3373c8e9076ea Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:05 +0200 Subject: added audio_format parameter to decoder_initialized() dc->audioFormat is set once by the decoder plugins before invoking decoder_initialized(); hide dc->audioFormat and let the decoder pass an AudioFormat pointer to decoder_initialized(). --- src/inputPlugins/mp3_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inputPlugins/mp3_plugin.c') diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 9959f8601..a7f39a3a4 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -1021,6 +1021,7 @@ static int mp3_decode(struct decoder * decoder, InputStream * inStream) mp3DecodeData data; MpdTag *tag = NULL; ReplayGainInfo *replayGainInfo = NULL; + AudioFormat audio_format; if (openMp3FromInputStream(inStream, &data, &tag, &replayGainInfo) < 0) { @@ -1032,8 +1033,7 @@ static int mp3_decode(struct decoder * decoder, InputStream * inStream) return 0; } - initAudioFormatFromMp3DecodeData(&data, &(dc.audioFormat)); - getOutputAudioFormat(&(dc.audioFormat), &(ob.audioFormat)); + initAudioFormatFromMp3DecodeData(&data, &audio_format); dc.totalTime = data.totalTime; @@ -1062,7 +1062,7 @@ static int mp3_decode(struct decoder * decoder, InputStream * inStream) freeMpdTag(tag); } - decoder_initialized(decoder); + decoder_initialized(decoder, &audio_format); while (mp3Read(&data, decoder, &replayGainInfo) != DECODE_BREAK) ; /* send last little bit if not DECODE_COMMAND_STOP */ -- cgit v1.2.3