aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-29 17:29:03 +0100
committerMax Kellermann <max@duempel.org>2008-10-29 17:29:03 +0100
commit74c85811afe85d7cd3024156b204a5d68f94df86 (patch)
tree4638af78010e504068c203d97a7328c0f7e5356f /src/decoder_api.c
parentc042faab42e0a2b2c6e25d7e1a84084ffc181d20 (diff)
downloadmpd-74c85811afe85d7cd3024156b204a5d68f94df86.tar.gz
mpd-74c85811afe85d7cd3024156b204a5d68f94df86.tar.xz
mpd-74c85811afe85d7cd3024156b204a5d68f94df86.zip
decoder_api: make the audio_format parameter mandatory
There are no callers which pass audio_format==NULL, and it shouldn't be allowed.
Diffstat (limited to 'src/decoder_api.c')
-rw-r--r--src/decoder_api.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 6d38685f4..f407a77d3 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -46,14 +46,12 @@ void decoder_initialized(struct decoder * decoder,
float total_time)
{
assert(dc.state == DECODE_STATE_START);
+ assert(audio_format != NULL);
pcm_convert_init(&decoder->conv_state);
- if (audio_format != NULL) {
- dc.audioFormat = *audio_format;
- getOutputAudioFormat(audio_format,
- &(ob.audioFormat));
- }
+ dc.audioFormat = *audio_format;
+ getOutputAudioFormat(audio_format, &ob.audioFormat);
dc.totalTime = total_time;