diff options
author | Max Kellermann <max@duempel.org> | 2012-06-12 23:22:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-06-12 23:22:03 +0200 |
commit | 4eb57e1e9a1718ce93eced6bd4fb06d8abb26477 (patch) | |
tree | 2355c6d77273cf614822f5a144005ab1d353863b /src/encoder_list.c | |
parent | d662c4c0cc089a6a493a7463e440f0f7e7959b48 (diff) | |
parent | 1d52e2cc7727d93e65d557c322b5dd7dc149651c (diff) | |
download | mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.tar.gz mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.tar.xz mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.zip |
Merge branch 'v0.16.x'
Conflicts:
src/cmdline.c
src/decoder/wildmidi_decoder_plugin.c
src/gcc.h
src/glib_compat.h
src/input_stream.c
src/output_list.c
src/output_thread.c
valgrind.suppressions
Diffstat (limited to 'src/encoder_list.c')
-rw-r--r-- | src/encoder_list.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/encoder_list.c b/src/encoder_list.c index d98e617b4..2326c1099 100644 --- a/src/encoder_list.c +++ b/src/encoder_list.c @@ -30,7 +30,7 @@ extern const struct encoder_plugin twolame_encoder_plugin; extern const struct encoder_plugin wave_encoder_plugin; extern const struct encoder_plugin flac_encoder_plugin; -static const struct encoder_plugin *encoder_plugins[] = { +const struct encoder_plugin *const encoder_plugins[] = { &null_encoder_plugin, #ifdef ENABLE_VORBIS_ENCODER &vorbis_encoder_plugin, @@ -53,19 +53,9 @@ static const struct encoder_plugin *encoder_plugins[] = { const struct encoder_plugin * encoder_plugin_get(const char *name) { - for (unsigned i = 0; encoder_plugins[i] != NULL; ++i) - if (strcmp(encoder_plugins[i]->name, name) == 0) - return encoder_plugins[i]; + encoder_plugins_for_each(plugin) + if (strcmp(plugin->name, name) == 0) + return plugin; return NULL; } - -void -encoder_plugin_print_all_types(FILE * fp) -{ - for (unsigned i = 0; encoder_plugins[i] != NULL; ++i) - fprintf(fp, "%s ", encoder_plugins[i]->name); - - fprintf(fp, "\n"); - fflush(fp); -} |