From d9f5cca9b83831c89c8fe93c47100f86e1649fd7 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Mon, 31 May 2004 20:59:55 +0000 Subject: mod_plugin, just for tarzeau git-svn-id: https://svn.musicpd.org/mpd/trunk@1263 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/inputPlugin.c') 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() { -- cgit v1.2.3