summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-22 14:56:26 +0200
committerwm4 <wm4@nowhere>2015-05-22 14:56:26 +0200
commiteb296d4fde98966854e239eb1ac0eed0c57f696f (patch)
tree45b27bdd1d4c9b09103c3d0d4e5469657f9fd967 /options
parent8c795d796327e478f177ea3e861a18dc3ab2b0fa (diff)
downloadmpv-eb296d4fde98966854e239eb1ac0eed0c57f696f.tar.bz2
mpv-eb296d4fde98966854e239eb1ac0eed0c57f696f.tar.xz
options: --loop without argument means looping forever
Adding a "yes" choice makes the option parser consider this option as a multi-state flag option, and without argument "yes" is implicitly selected. "yes" is made an alias for "inf", so it will loop infinitely. As a negative side effect, the old syntax "-loop inf" does not work anymore. Since this is ambiguous, the option parser prefers interpreting the "inf" as filename. Fixes #1970.
Diffstat (limited to 'options')
-rw-r--r--options/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index 576b1ec08b..b4662605ae 100644
--- a/options/options.c
+++ b/options/options.c
@@ -477,7 +477,7 @@ const m_option_t mp_opts[] = {
OPT_CHOICE_OR_INT("loop", loop_times, 0, 1, 10000,
({"no", 1},
- {"inf", -1},
+ {"inf", -1}, {"yes", -1},
{"force", -2})),
OPT_CHOICE_OR_INT("loop-file", loop_file, 0, 0, 10000,
({"no", 0},