aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/aac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:05 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:05 +0200
commit4590a98f0eb9484e185e7e0c25a3373c8e9076ea (patch)
tree94ea0d53bdf0b7f9b81ff679b0fb4466d971b1e5 /src/inputPlugins/aac_plugin.c
parent0d45870cea6836cd48e6953f4e67756b2502e22c (diff)
downloadmpd-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/aac_plugin.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index 8765dc21c..4fa54c646 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -286,6 +286,7 @@ static int aac_decode(struct decoder * mpd_decoder, char *path)
faacDecFrameInfo frameInfo;
faacDecConfigurationPtr config;
long bread;
+ AudioFormat audio_format;
uint32_t sampleRate;
unsigned char channels;
int eof = 0;
@@ -335,7 +336,7 @@ static int aac_decode(struct decoder * mpd_decoder, char *path)
return -1;
}
- dc.audioFormat.bits = 16;
+ audio_format.bits = 16;
dc.totalTime = totalTime;
@@ -369,11 +370,9 @@ static int aac_decode(struct decoder * mpd_decoder, char *path)
#endif
if (dc.state != DECODE_STATE_DECODE) {
- dc.audioFormat.channels = frameInfo.channels;
- dc.audioFormat.sampleRate = sampleRate;
- getOutputAudioFormat(&(dc.audioFormat),
- &(ob.audioFormat));
- decoder_initialized(mpd_decoder);
+ audio_format.channels = frameInfo.channels;
+ audio_format.sampleRate = sampleRate;
+ decoder_initialized(mpd_decoder, &audio_format);
}
advanceAacBuffer(&b, frameInfo.bytesconsumed);