aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.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/decoder_api.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/decoder_api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 99f7293bb..9583c7493 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -24,10 +24,17 @@
#include "playerData.h"
#include "gcc.h"
-void decoder_initialized(mpd_unused struct decoder * decoder)
+void decoder_initialized(mpd_unused struct decoder * decoder,
+ const AudioFormat * audio_format)
{
assert(dc.state == DECODE_STATE_START);
+ if (audio_format != NULL) {
+ dc.audioFormat = *audio_format;
+ getOutputAudioFormat(audio_format,
+ &(ob.audioFormat));
+ }
+
dc.state = DECODE_STATE_DECODE;
notify_signal(&pc.notify);
}