aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_list.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-02 13:30:26 +0100
committerMax Kellermann <max@duempel.org>2008-11-02 13:30:26 +0100
commitb48ae8c26fafe3e2bf8767a2fb7aa1779fe8abc4 (patch)
treeec98a0c7eb8ec36ef36b5eeec6eafd28f33339d2 /src/decoder_list.c
parent4c1b96c30721f78d9251a8074d4d516c37e755b9 (diff)
downloadmpd-b48ae8c26fafe3e2bf8767a2fb7aa1779fe8abc4.tar.gz
mpd-b48ae8c26fafe3e2bf8767a2fb7aa1779fe8abc4.tar.xz
mpd-b48ae8c26fafe3e2bf8767a2fb7aa1779fe8abc4.zip
decoder: enable decoders even if they have no init() method
Commit 1a4a3e1f moved decoders into a static array, but failed to enable those plugins who did not have an init() method at all. This patch corrects the "enabled" check.
Diffstat (limited to '')
-rw-r--r--src/decoder_list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder_list.c b/src/decoder_list.c
index f2f245617..68c053c2a 100644
--- a/src/decoder_list.c
+++ b/src/decoder_list.c
@@ -165,7 +165,7 @@ 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 (plugin->init == NULL || decoder_plugins[i]->init())
decoder_plugins_enabled[i] = true;
}
}