summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-23 15:20:43 +0200
committerwm4 <wm4@nowhere>2017-06-23 16:54:09 +0200
commitcafff87d3a6067170ea56369a0a2373cafb64414 (patch)
tree1e61c168acd54900d60693f84e35eec2ccc6f37f
parent1c4d97c67ae86ed6bf4cd04c905962b5d34abd81 (diff)
downloadmpv-cafff87d3a6067170ea56369a0a2373cafb64414.tar.bz2
mpv-cafff87d3a6067170ea56369a0a2373cafb64414.tar.xz
player: revert multiple help output
I think the idea is that you can pass multiple help options on the command line, and it will print them all, instead of printing only the first one and exiting. This was added in commit 43844d09, but the patch author could not be reached. Revert it, as it's not a critical feature.
-rw-r--r--player/main.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/player/main.c b/player/main.c
index cee9458470..e8769c1236 100644
--- a/player/main.c
+++ b/player/main.c
@@ -257,43 +257,42 @@ static bool handle_help_options(struct MPContext *mpctx)
{
struct MPOpts *opts = mpctx->opts;
struct mp_log *log = mpctx->log;
- int opt_exit = 0;
if (opts->audio_decoders && strcmp(opts->audio_decoders, "help") == 0) {
struct mp_decoder_list *list = audio_decoder_list();
mp_print_decoders(log, MSGL_INFO, "Audio decoders:", list);
talloc_free(list);
- opt_exit = 1;
+ return true;
}
if (opts->audio_spdif && strcmp(opts->audio_spdif, "help") == 0) {
MP_INFO(mpctx, "Choices: ac3,dts-hd,dts (and possibly more)\n");
- opt_exit = 1;
+ return true;
}
if (opts->video_decoders && strcmp(opts->video_decoders, "help") == 0) {
struct mp_decoder_list *list = video_decoder_list();
mp_print_decoders(log, MSGL_INFO, "Video decoders:", list);
talloc_free(list);
- opt_exit = 1;
+ return true;
}
if ((opts->demuxer_name && strcmp(opts->demuxer_name, "help") == 0) ||
(opts->audio_demuxer_name && strcmp(opts->audio_demuxer_name, "help") == 0) ||
(opts->sub_demuxer_name && strcmp(opts->sub_demuxer_name, "help") == 0)) {
demuxer_help(log);
MP_INFO(mpctx, "\n");
- opt_exit = 1;
+ return true;
}
if (opts->audio_device && strcmp(opts->audio_device, "help") == 0) {
ao_print_devices(mpctx->global, log);
- opt_exit = 1;
+ return true;
}
if (opts->property_print_help) {
property_print_help(mpctx);
- opt_exit = 1;
+ return true;
}
#if HAVE_ENCODING
if (encode_lavc_showhelp(log, opts->encode_opts))
- opt_exit = 1;
+ return true;
#endif
- return opt_exit;
+ return false;
}
static void handle_deprecated_options(struct MPContext *mpctx)