aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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() {