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.
This commit is contained in:
Max Kellermann 2008-11-02 13:30:26 +01:00
parent 4c1b96c307
commit b48ae8c26f

View File

@ -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;
}
}