diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:05 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:05 +0200 |
commit | 4590a98f0eb9484e185e7e0c25a3373c8e9076ea (patch) | |
tree | 94ea0d53bdf0b7f9b81ff679b0fb4466d971b1e5 /src/inputPlugins/mp3_plugin.c | |
parent | 0d45870cea6836cd48e6953f4e67756b2502e22c (diff) | |
download | mpd-4590a98f0eb9484e185e7e0c25a3373c8e9076ea.tar.gz mpd-4590a98f0eb9484e185e7e0c25a3373c8e9076ea.tar.xz mpd-4590a98f0eb9484e185e7e0c25a3373c8e9076ea.zip |
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().
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 */ |