aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c
diff options
context:
space:
mode:
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);
}