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.
This commit is contained in:
Max Kellermann
2009-12-08 08:47:47 +01:00
parent f4b707b4ca
commit 5a354a1ed4
2 changed files with 5 additions and 0 deletions

View File

@@ -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);