aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugin.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-31 20:59:55 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-31 20:59:55 +0000
commitd9f5cca9b83831c89c8fe93c47100f86e1649fd7 (patch)
treef563b57b92b1bb17e9322615bef6b3623650f537 /src/inputPlugin.c
parent2c1f5365ebbd7ffd9ffa660a39ebc052ef96e4d2 (diff)
downloadmpd-d9f5cca9b83831c89c8fe93c47100f86e1649fd7.tar.gz
mpd-d9f5cca9b83831c89c8fe93c47100f86e1649fd7.tar.xz
mpd-d9f5cca9b83831c89c8fe93c47100f86e1649fd7.zip
mod_plugin, just for tarzeau
git-svn-id: https://svn.musicpd.org/mpd/trunk@1263 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputPlugin.c')
-rw-r--r--src/inputPlugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/inputPlugin.c b/src/inputPlugin.c
index bd317964f..72286d3f6 100644
--- a/src/inputPlugin.c
+++ b/src/inputPlugin.c
@@ -11,10 +11,13 @@ void loadInputPlugin(InputPlugin * inputPlugin) {
if(!inputPlugin) return;
if(!inputPlugin->name) return;
+ if(inputPlugin->initFunc && inputPlugin->initFunc() < 0) return;
+
insertInList(inputPlugin_list, inputPlugin->name, (void *)inputPlugin);
}
void unloadInputPlugin(InputPlugin * inputPlugin) {
+ if(inputPlugin->finishFunc) inputPlugin->finishFunc();
deleteFromList(inputPlugin_list, inputPlugin->name);
}
@@ -73,6 +76,7 @@ extern InputPlugin flacPlugin;
extern InputPlugin audiofilePlugin;
extern InputPlugin mp4Plugin;
extern InputPlugin aacPlugin;
+extern InputPlugin modPlugin;
void initInputPlugins() {
inputPlugin_list = makeList(NULL);
@@ -83,7 +87,7 @@ void initInputPlugins() {
loadInputPlugin(&flacPlugin);
loadInputPlugin(&audiofilePlugin);
loadInputPlugin(&mp4Plugin);
- loadInputPlugin(&aacPlugin);
+ loadInputPlugin(&modPlugin);
}
void finishInputPlugins() {