mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
8c795d7963
commit
eb296d4fde
|
@ -477,7 +477,7 @@ const m_option_t mp_opts[] = {
|
||||||
|
|
||||||
OPT_CHOICE_OR_INT("loop", loop_times, 0, 1, 10000,
|
OPT_CHOICE_OR_INT("loop", loop_times, 0, 1, 10000,
|
||||||
({"no", 1},
|
({"no", 1},
|
||||||
{"inf", -1},
|
{"inf", -1}, {"yes", -1},
|
||||||
{"force", -2})),
|
{"force", -2})),
|
||||||
OPT_CHOICE_OR_INT("loop-file", loop_file, 0, 0, 10000,
|
OPT_CHOICE_OR_INT("loop-file", loop_file, 0, 0, 10000,
|
||||||
({"no", 0},
|
({"no", 0},
|
||||||
|
|
Loading…
Reference in New Issue