From e9fc53a10b889c5add90364ded20d0448b88f93a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 8 Feb 2020 14:57:45 +0100 Subject: player: add ab-loop-count option/property As requested I guess. It behaves quite similar to the --loop* options. Not quite happy with the idea that 1) the option is mutated on each operation (but at least it's consistent with --loop* and doesn't require more properties), and 2) the ab-loop command will do nothing once all loop iterations are done. As a concession, the OSD shows something about "disabled". Fixes: #7360 --- player/misc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'player/misc.c') diff --git a/player/misc.c b/player/misc.c index c3765e5055..f6a63ec7ef 100644 --- a/player/misc.c +++ b/player/misc.c @@ -123,6 +123,9 @@ bool get_ab_loop_times(struct MPContext *mpctx, double t[2]) t[0] = opts->ab_loop[0]; t[1] = opts->ab_loop[1]; + if (!opts->ab_loop_count) + return false; + if (t[0] == MP_NOPTS_VALUE || t[1] == MP_NOPTS_VALUE || t[0] == t[1]) return false; -- cgit v1.2.3