aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/decoder_api.c11
-rw-r--r--src/decoder_api.h4
-rw-r--r--src/inputPlugins/flac_plugin.c3
3 files changed, 16 insertions, 2 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index d933f6c7e..ffc3aa781 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -18,6 +18,7 @@
*/
#include "decoder_internal.h"
+#include "decoder_list.h"
#include "audio.h"
#include "utils.h"
@@ -25,6 +26,16 @@
#include "playerData.h"
#include "gcc.h"
+void decoder_plugin_register(struct decoder_plugin *plugin)
+{
+ decoder_plugin_load(plugin);
+}
+
+void decoder_plugin_unregister(struct decoder_plugin *plugin)
+{
+ decoder_plugin_unload(plugin);
+}
+
void decoder_initialized(struct decoder * decoder,
const AudioFormat * audio_format,
float total_time)
diff --git a/src/decoder_api.h b/src/decoder_api.h
index becaaada6..5afa06e77 100644
--- a/src/decoder_api.h
+++ b/src/decoder_api.h
@@ -87,6 +87,10 @@ struct decoder_plugin {
};
+void decoder_plugin_register(struct decoder_plugin *plugin);
+
+void decoder_plugin_unregister(struct decoder_plugin *plugin);
+
/**
* Opaque handle which the decoder plugin passes to the functions in
* this header.
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index c0456791f..9b1c8d85d 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -22,7 +22,6 @@
#include "../utils.h"
#include "../log.h"
-#include "../decoder_list.h"
/* this code was based on flac123, from flac-tools */
@@ -533,7 +532,7 @@ static int flac_plugin_init(void)
INPUT_PLUGIN_STREAM_FILE;
oggflacPlugin.suffixes = oggflac_suffixes;
oggflacPlugin.mime_types = oggflac_mime_types;
- decoder_plugin_load(&oggflacPlugin);
+ decoder_plugin_register(&oggflacPlugin);
return 1;
}