summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-12 22:41:45 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-02-16 18:09:12 +0900
commite4eb9c5469da74ae48024bd2e6a80cee9e8edac1 (patch)
tree1b8131e7b6467e934e01165d81781df22b655674 /options
parent43879197531d51634983c29a487df242c211d5b5 (diff)
downloadmpv-e4eb9c5469da74ae48024bd2e6a80cee9e8edac1.tar.bz2
mpv-e4eb9c5469da74ae48024bd2e6a80cee9e8edac1.tar.xz
player: add a --loop=force mode
Requested. See manpage additions. This also makes the magical loop_times constants slightly saner, but shouldn't change the semantics of any existing --loop option values. (cherry picked from commit aee0978d50e21d8f114382fdb9c014c029f71a04)
Diffstat (limited to 'options')
-rw-r--r--options/options.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/options/options.c b/options/options.c
index 55b444a983..a0674b6185 100644
--- a/options/options.c
+++ b/options/options.c
@@ -500,9 +500,10 @@ const m_option_t mp_opts[] = {
OPT_FLAG("stop-playback-on-init-failure", stop_playback_on_init_failure, 0),
- OPT_CHOICE_OR_INT("loop", loop_times, M_OPT_GLOBAL, 2, 10000,
- ({"no", -1}, {"1", -1},
- {"inf", 0})),
+ OPT_CHOICE_OR_INT("loop", loop_times, M_OPT_GLOBAL, 1, 10000,
+ ({"no", 1},
+ {"inf", -1},
+ {"force", -2})),
OPT_CHOICE_OR_INT("loop-file", loop_file, M_OPT_OPTIONAL_PARAM, 0, 10000,
({"yes", -1}, {"", -1}, {"no", 0}, // compat
{"inf", -1})),
@@ -712,7 +713,7 @@ const struct MPOpts mp_default_opts = {
.lua_ytdl_format = NULL,
#endif
.auto_load_scripts = 1,
- .loop_times = -1,
+ .loop_times = 1,
.ordered_chapters = 1,
.chapter_merge_threshold = 100,
.chapter_seek_threshold = 5.0,