Commit b88b2b3d authored by Denis Krjuchkov's avatar Denis Krjuchkov Committed by Max Kellermann

output_init: initialize replay gain filters to NULL in ao_base_init()

If output plugin fails to init it will try to call ao_base_finish() immediately, which segfaults because replay gain filters are not initialized yet and contain garbage values.
parent 744d729d
...@@ -213,6 +213,8 @@ ao_base_init(struct audio_output *ao, ...@@ -213,6 +213,8 @@ ao_base_init(struct audio_output *ao,
ao->cond = g_cond_new(); ao->cond = g_cond_new();
ao->mixer = NULL; ao->mixer = NULL;
ao->replay_gain_filter = NULL;
ao->other_replay_gain_filter = NULL;
/* the "convert" filter must be the last one in the chain */ /* the "convert" filter must be the last one in the chain */
......
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