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 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/audioOutputs/audioOutput_jack.c 
b/src/audioOutputs/audioOutput_jack.c
index a62c0a0..4a30e89 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);


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to