diff options
author | Denis Krjuchkov <denis@crazydev.net> | 2011-10-23 12:51:33 +0600 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-12-13 19:12:30 +0100 |
commit | b88b2b3d79159c3468a579afdbdc3d1f28494faa (patch) | |
tree | b75d5aa0187ed5f6b1285db3f80e40f7b9d1cc41 /src/output_init.c | |
parent | 744d729dab2a37dd913e3e9aff2141ee7aa252e5 (diff) | |
download | mpd-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/output_init.c')
-rw-r--r-- | src/output_init.c | 2 |
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 */ |