diff options
author | Max Kellermann <max@duempel.org> | 2008-11-02 13:30:26 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-02 13:30:26 +0100 |
commit | b48ae8c26fafe3e2bf8767a2fb7aa1779fe8abc4 (patch) | |
tree | ec98a0c7eb8ec36ef36b5eeec6eafd28f33339d2 /src/decoder_list.c | |
parent | 4c1b96c30721f78d9251a8074d4d516c37e755b9 (diff) | |
download | mpd-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.c | 2 |
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; } } |