aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-29 23:16:21 +0100
committerMax Kellermann <max@duempel.org>2009-01-29 23:16:21 +0100
commite959c8e084069aa8aa453cd36e15d9aed15055be (patch)
treef1f09d15974a2da6b1cae9360b5e069ff432c17c /src
parente68924435a0e9a3fc391be0426c43847a47287f4 (diff)
downloadmpd-e959c8e084069aa8aa453cd36e15d9aed15055be.tar.gz
mpd-e959c8e084069aa8aa453cd36e15d9aed15055be.tar.xz
mpd-e959c8e084069aa8aa453cd36e15d9aed15055be.zip
jack: close JACK client on stop
When MPD stops playback, close the JACK client connection.
Diffstat (limited to '')
-rw-r--r--src/output/jack_plugin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c
index 4a96b4d82..2e93d2ec8 100644
--- a/src/output/jack_plugin.c
+++ b/src/output/jack_plugin.c
@@ -88,8 +88,6 @@ mpd_jack_free(struct jack_data *jd)
{
assert(jd != NULL);
- mpd_jack_client_free(jd);
-
for (unsigned i = 0; i < G_N_ELEMENTS(jd->output_ports); ++i)
g_free(jd->output_ports[i]);
@@ -286,7 +284,7 @@ mpd_jack_open(void *data, struct audio_format *audio_format)
assert(jd != NULL);
- if (jd->client == NULL && !mpd_jack_connect(jd, audio_format)) {
+ if (!mpd_jack_connect(jd, audio_format)) {
mpd_jack_client_free(jd);
return false;
}
@@ -299,7 +297,9 @@ mpd_jack_open(void *data, struct audio_format *audio_format)
static void
mpd_jack_close(G_GNUC_UNUSED void *data)
{
- /*mpd_jack_finish(audioOutput);*/
+ struct jack_data *jd = data;
+
+ mpd_jack_client_free(jd);
}
static void