From 9fe076f02a67a87a79856e9583fc76aeb211c330 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 22 Sep 2014 22:56:00 +0200 Subject: player: allow passing number of loops to --loop-file E.g. --loop-file=2 will play the file 3 times (one time normally, and 2 repeats). Minor syntax issue: "--loop-file 5" won't work, you have to use "--loop-file=5". This is because "--loop-file" still has to work for compatibility, so the "old" syntax with a space between option name and value can't work. --- player/playloop.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 647a864513..b9e35b41eb 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -756,6 +756,8 @@ static void handle_loop_file(struct MPContext *mpctx) mpctx->stop_play = KEEP_PLAYING; set_osd_function(mpctx, OSD_FFW); queue_seek(mpctx, MPSEEK_ABSOLUTE, get_start_time(mpctx), 0, true); + if (opts->loop_file > 0) + opts->loop_file--; } } -- cgit v1.2.3