From b48ae8c26fafe3e2bf8767a2fb7aa1779fe8abc4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Nov 2008 13:30:26 +0100 Subject: 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. --- src/decoder_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- cgit v1.2.3