aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-10-20 20:41:21 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-10-20 20:41:21 +0000
commit72a7740fd5755d09e13978bde7f729deb43bdd55 (patch)
tree019f3e630680fabe7cfa5755f1497b142f5f1f34 /src/audioOutput.c
parenteefcf79436c80075fa373e65bf6249ba9b4c9b04 (diff)
downloadmpd-72a7740fd5755d09e13978bde7f729deb43bdd55.tar.gz
mpd-72a7740fd5755d09e13978bde7f729deb43bdd55.tar.xz
mpd-72a7740fd5755d09e13978bde7f729deb43bdd55.zip
shout audioOutput will now connect and disconnect from icecast server
git-svn-id: https://svn.musicpd.org/mpd/trunk@2285 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audioOutput.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/audioOutput.c b/src/audioOutput.c
index 5352be012..24899e814 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -28,13 +28,16 @@ AudioOutput * newAudioOutput(char * name) {
if(findInList(audioOutputPluginList, name, &data)) {
AudioOutputPlugin * plugin = (AudioOutputPlugin *) data;
ret = malloc(sizeof(AudioOutput));
- ret->finishDriverFunc = plugin->initDriverFunc;
+ ret->finishDriverFunc = plugin->finishDriverFunc;
ret->openDeviceFunc = plugin->openDeviceFunc;
ret->playFunc = plugin->playFunc;
ret->closeDeviceFunc = plugin->closeDeviceFunc;
ret->open = 0;
- plugin->initDriverFunc(ret);
+ if(plugin->initDriverFunc(ret) != 0) {
+ free(ret);
+ ret = NULL;
+ }
}
return ret;