aboutsummaryrefslogtreecommitdiff
path: root/src/mixer_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-08 08:47:47 +0100
committerMax Kellermann <max@duempel.org>2009-12-08 08:47:47 +0100
commit5a354a1ed4addd7bc757af8da797c768580454c2 (patch)
tree3f6bec247ba66e7d52883c42fd4793355a5992d7 /src/mixer_control.c
parentf4b707b4ca6451fcb1a6af6d3f2e58579b3c01a5 (diff)
mixer: explicitly close all mixers on shutdown
Mixers with the "global" flag set aren't closed automatically when the output device is closed. Thus, they might still be open when MPD shuts down.
Diffstat (limited to 'src/mixer_control.c')
-rw-r--r--src/mixer_control.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mixer_control.c b/src/mixer_control.c
index a1788593..e19b82d6 100644
--- a/src/mixer_control.c
+++ b/src/mixer_control.c
@@ -62,6 +62,10 @@ mixer_free(struct mixer *mixer)
assert(mixer->plugin != NULL);
assert(mixer->mutex != NULL);
+ /* mixers with the "global" flag set might still be open at
+ this point (see mixer_auto_close()) */
+ mixer_close(mixer);
+
g_mutex_free(mixer->mutex);
mixer->plugin->finish(mixer);