aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:15 +0200
committerEric Wong <normalperson@yhbt.net>2008-08-31 00:44:30 -0700
commit641e530f447771642ac627c91e8bff67fcb71fd3 (patch)
tree2abcc40125f566fbf96809fc9ed48ea047c2a7b7 /src
parent8e0b55596ee1b33457b14f757eb50a69caeab60e (diff)
downloadmpd-641e530f447771642ac627c91e8bff67fcb71fd3.tar.gz
mpd-641e530f447771642ac627c91e8bff67fcb71fd3.tar.xz
mpd-641e530f447771642ac627c91e8bff67fcb71fd3.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/audioOutputs/audioOutput_jack.c10
1 files changed, 5 insertions, 5 deletions
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);