From 641e530f447771642ac627c91e8bff67fcb71fd3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:15 +0200 Subject: jack: initialize jd->client after !jd check Prepare the next patch: make the "!jd" check independent of the jd->client initialization. This way we can change the "jd" initialization semantics later. --- src/audioOutputs/audioOutput_jack.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/audioOutputs/audioOutput_jack.c') diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c index a62c0a0e9..4a30e897e 100644 --- a/src/audioOutputs/audioOutput_jack.c +++ b/src/audioOutputs/audioOutput_jack.c @@ -337,12 +337,12 @@ static int jack_openDevice(AudioOutput *audioOutput) DEBUG("connect!\n"); jd = newJackData(); audioOutput->data = jd; + } - if (connect_jack(audioOutput) < 0) { - freeJackData(audioOutput); - audioOutput->open = 0; - return -1; - } + if (jd->client == NULL && connect_jack(audioOutput) < 0) { + freeJackData(audioOutput); + audioOutput->open = 0; + return -1; } set_audioformat(audioOutput); -- cgit v1.2.3