aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audioOutput_shout.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/audioOutput_shout.c b/src/audioOutput_shout.c
index 2885ef594..f27c56e4f 100644
--- a/src/audioOutput_shout.c
+++ b/src/audioOutput_shout.c
@@ -364,13 +364,11 @@ static int shout_openShoutConn(AudioOutput * audioOutput) {
ERROR("problem opening connection to shout server: %s\n",
shout_get_error(sd->shoutConn));
- audioOutput->open = 0;
return -1;
}
if(initEncoder(sd) < 0) {
shout_close(sd->shoutConn);
- audioOutput->open = 0;
return -1;
}
@@ -414,7 +412,12 @@ static int shout_openDevice(AudioOutput * audioOutput,
if(sd->opened) return 0;
- return shout_openShoutConn(audioOutput);
+ if(shout_openShoutConn(audioOutput) < 0) {
+ audioOutput->open = 1;
+ return -1;
+ }
+
+ return 0;
}
static void shout_convertAudioFormat(ShoutData * sd, char ** chunkArgPtr,