aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-06 21:50:25 +0200
committerMax Kellermann <max@duempel.org>2009-07-06 21:50:25 +0200
commit171a9ee291ff079a2d70bd46f113acae3b6ef00b (patch)
treeaed1273724c355cc776a3dc728401393f4966d7f /src
parent13e725ab0927aed210c599bdd6e6a285285c3476 (diff)
downloadmpd-171a9ee291ff079a2d70bd46f113acae3b6ef00b.tar.gz
mpd-171a9ee291ff079a2d70bd46f113acae3b6ef00b.tar.xz
mpd-171a9ee291ff079a2d70bd46f113acae3b6ef00b.zip
output_init: moved the "convert" filter at the end
The "convert" filter must be the last filter in the chain. Ensure that by doing its initialization at the very end of audio_output_init().
Diffstat (limited to 'src')
-rw-r--r--src/output_init.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/output_init.c b/src/output_init.c
index 2b227a130..eba665e77 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -140,11 +140,6 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
ao->filter = filter_chain_new();
assert(ao->filter != NULL);
- ao->convert_filter = filter_new(&convert_filter_plugin, NULL, NULL);
- assert(ao->convert_filter != NULL);
-
- filter_chain_append(ao->filter, ao->convert_filter);
-
ao->thread = NULL;
notify_init(&ao->notify);
ao->command = AO_COMMAND_NONE;
@@ -159,5 +154,14 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
ao->mixer = audio_output_load_mixer(param, plugin->mixer_plugin);
+ /* the "convert" filter must be the last one in the chain */
+
+ ao->convert_filter = filter_new(&convert_filter_plugin, NULL, NULL);
+ assert(ao->convert_filter != NULL);
+
+ filter_chain_append(ao->filter, ao->convert_filter);
+
+ /* done */
+
return true;
}