Commit dc989987 authored by Max Kellermann's avatar Max Kellermann

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.
parent 23832311
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment