diff options
author | Max Kellermann <max@duempel.org> | 2008-09-11 07:47:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-11 07:47:28 +0200 |
commit | 56cf54e880359d40dae7df460b23101a4f1a77fb (patch) | |
tree | a8355909361852235c3cb04fc403f25b6551c604 /src/output_init.c | |
parent | a751011e8cf5bf8cfbcd3f3be9eb424d6569b7e7 (diff) | |
download | mpd-56cf54e880359d40dae7df460b23101a4f1a77fb.tar.gz mpd-56cf54e880359d40dae7df460b23101a4f1a77fb.tar.xz mpd-56cf54e880359d40dae7df460b23101a4f1a77fb.zip |
output: removed audio_output.convertAudioFormat
Instead of checking convertAudioFormat, we can simply check if
reqAudioFormat is defined. This saves 4 bytes in the struct.
Diffstat (limited to '')
-rw-r--r-- | src/output_init.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/output_init.c b/src/output_init.c index d339f3540..0a91565c8 100644 --- a/src/output_init.c +++ b/src/output_init.c @@ -86,25 +86,22 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param) ao->plugin = plugin; ao->open = 0; - ao->convertAudioFormat = 0; ao->sameInAndOutFormats = 0; ao->convBuffer = NULL; ao->convBufferLen = 0; memset(&ao->inAudioFormat, 0, sizeof(ao->inAudioFormat)); memset(&ao->outAudioFormat, 0, sizeof(ao->outAudioFormat)); - memset(&ao->reqAudioFormat, 0, sizeof(ao->reqAudioFormat)); memset(&ao->convState, 0, sizeof(ConvState)); if (format) { - ao->convertAudioFormat = 1; - if (0 != parseAudioConfig(&ao->reqAudioFormat, format)) { FATAL("error parsing format at line %i\n", bp->line); } ao->outAudioFormat = ao->reqAudioFormat; - } + } else + audio_format_clear(&ao->reqAudioFormat); if (plugin->init(ao, param) != 0) return 0; |