aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_list.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-15 18:33:28 +0100
committerMax Kellermann <max@duempel.org>2009-02-15 18:33:28 +0100
commit3e3c524264ceedb9aff3291ed9f7b516250d428e (patch)
treed424a9eef99f3f01181fa5a039fc8609b978fa90 /src/decoder_list.c
parenta28287073b6ced1ab2b3c7dcc0a1168d9e7ac7ea (diff)
downloadmpd-3e3c524264ceedb9aff3291ed9f7b516250d428e.tar.gz
mpd-3e3c524264ceedb9aff3291ed9f7b516250d428e.tar.xz
mpd-3e3c524264ceedb9aff3291ed9f7b516250d428e.zip
decoder_plugin: added inline wrapper functions
Increase code readability, always use the wrapper functions instead of calling the plugin method pointers directly.
Diffstat (limited to 'src/decoder_list.c')
-rw-r--r--src/decoder_list.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/decoder_list.c b/src/decoder_list.c
index 550fb1e73..ba179ee70 100644
--- a/src/decoder_list.c
+++ b/src/decoder_list.c
@@ -189,7 +189,8 @@ void decoder_plugin_init_all(void)
{
for (unsigned i = 0; i < num_decoder_plugins; ++i) {
const struct decoder_plugin *plugin = decoder_plugins[i];
- if (plugin->init == NULL || decoder_plugins[i]->init())
+
+ if (decoder_plugin_init(plugin))
decoder_plugins_enabled[i] = true;
}
}
@@ -198,7 +199,8 @@ void decoder_plugin_deinit_all(void)
{
for (unsigned i = 0; i < num_decoder_plugins; ++i) {
const struct decoder_plugin *plugin = decoder_plugins[i];
- if (decoder_plugins_enabled[i] && plugin->finish != NULL)
- decoder_plugins[i]->finish();
+
+ if (decoder_plugins_enabled[i])
+ decoder_plugin_finish(plugin);
}
}