aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput_shout.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audioOutput_shout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audioOutput_shout.c b/src/audioOutput_shout.c
index b33cc5820..2283aef35 100644
--- a/src/audioOutput_shout.c
+++ b/src/audioOutput_shout.c
@@ -403,6 +403,8 @@ static void shout_sendMetadata(AudioOutput * audioOutput, MpdTag * tag) {
ShoutData * sd = (ShoutData *)audioOutput->data;
ogg_int64_t granulepos = sd->vd.granulepos;
+ if(!sd->opened) return;
+
clearEncoder(sd);
if(initEncoder(sd) < 0) return;
@@ -427,7 +429,7 @@ static void shout_sendMetadata(AudioOutput * audioOutput, MpdTag * tag) {
while(ogg_stream_flush(&(sd->os), &(sd->og)))
{
- if(write_page(sd) < 0) return -1;
+ if(write_page(sd) < 0) return;
}
}