aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:15 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:15 +0200
commitdc989987ab1bcb854fa378041997aedfa7ffba79 (patch)
tree43cd77b1eab5073b38955070d47b0cc3c72510f8 /src
parent2383231123ec8322404f7f4df30b1db5a8d72cfd (diff)
downloadmpd-dc989987ab1bcb854fa378041997aedfa7ffba79.tar.gz
mpd-dc989987ab1bcb854fa378041997aedfa7ffba79.tar.xz
mpd-dc989987ab1bcb854fa378041997aedfa7ffba79.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);