diff options
-rw-r--r-- | src/output_init.c | 14 |
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; } |