aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmdline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmdline.c')
-rw-r--r--src/cmdline.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index 5dd6b26d6..695857d54 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -22,6 +22,7 @@
#include "log.h"
#include "conf.h"
#include "decoder_list.h"
+#include "decoder_plugin.h"
#include "config.h"
#include "output_list.h"
#include "ls.h"
@@ -44,6 +45,25 @@ cmdline_quark(void)
return g_quark_from_static_string("cmdline");
}
+static void
+print_all_decoders(FILE *fp)
+{
+ for (unsigned i = 0; decoder_plugins[i] != NULL; ++i) {
+ const struct decoder_plugin *plugin = decoder_plugins[i];
+ const char *const*suffixes;
+
+ fprintf(fp, "[%s]", plugin->name);
+
+ for (suffixes = plugin->suffixes;
+ suffixes != NULL && *suffixes != NULL;
+ ++suffixes) {
+ fprintf(fp, " %s", *suffixes);
+ }
+
+ fprintf(fp, "\n");
+ }
+}
+
G_GNUC_NORETURN
static void version(void)
{
@@ -56,8 +76,7 @@ static void version(void)
"\n"
"Supported decoders:\n");
- decoder_plugin_init_all();
- decoder_plugin_print_all_decoders(stdout);
+ print_all_decoders(stdout);
puts("\n"
"Supported outputs:\n");