Commit 171a9ee2 authored by Max Kellermann's avatar Max Kellermann

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().
parent 13e725ab
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment