aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2011-10-23 12:51:33 +0600
committerMax Kellermann <max@duempel.org>2011-12-13 19:12:30 +0100
commitb88b2b3d79159c3468a579afdbdc3d1f28494faa (patch)
treeb75d5aa0187ed5f6b1285db3f80e40f7b9d1cc41 /src
parent744d729dab2a37dd913e3e9aff2141ee7aa252e5 (diff)
downloadmpd-b88b2b3d79159c3468a579afdbdc3d1f28494faa.tar.gz
mpd-b88b2b3d79159c3468a579afdbdc3d1f28494faa.tar.xz
mpd-b88b2b3d79159c3468a579afdbdc3d1f28494faa.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/output_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/output_init.c b/src/output_init.c
index 51fe36c47..3b8a7a9f1 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -213,6 +213,8 @@ ao_base_init(struct audio_output *ao,
ao->cond = g_cond_new();
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 */