diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-11-01 13:21:10 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-11-01 13:21:10 +0000 |
commit | 8cb147764b3b379f0ecd2efb69e6c200ecfbef7c (patch) | |
tree | 2ae70ad4e7092510758a43b959e623ec41b4b854 | |
parent | fab2bef87a9d2d448b63315a731015f43f34bc7a (diff) | |
download | mpd-8cb147764b3b379f0ecd2efb69e6c200ecfbef7c.tar.gz mpd-8cb147764b3b379f0ecd2efb69e6c200ecfbef7c.tar.xz mpd-8cb147764b3b379f0ecd2efb69e6c200ecfbef7c.zip |
bad shank, don't set ao->open in openShoutConn(), bad shank
this should fix a few bugs, possibly the memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@2442 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/audioOutput_shout.c | 9 |
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, |