From a2dbae4884e83827b927d0181012d0759c9b0693 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Mon, 25 Oct 2004 22:41:46 +0000 Subject: some shout cleanups git-svn-id: https://svn.musicpd.org/mpd/trunk@2343 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutput_shout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; } } -- cgit v1.2.3