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.
This commit is contained in:
@@ -337,12 +337,12 @@ static int jack_openDevice(AudioOutput *audioOutput)
|
|||||||
DEBUG("connect!\n");
|
DEBUG("connect!\n");
|
||||||
jd = newJackData();
|
jd = newJackData();
|
||||||
audioOutput->data = jd;
|
audioOutput->data = jd;
|
||||||
|
}
|
||||||
|
|
||||||
if (connect_jack(audioOutput) < 0) {
|
if (jd->client == NULL && connect_jack(audioOutput) < 0) {
|
||||||
freeJackData(audioOutput);
|
freeJackData(audioOutput);
|
||||||
audioOutput->open = 0;
|
audioOutput->open = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_audioformat(audioOutput);
|
set_audioformat(audioOutput);
|
||||||
|
Reference in New Issue
Block a user