diff options
author | wm4 <wm4@nowhere> | 2014-09-22 22:56:00 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-22 22:56:00 +0200 |
commit | 9fe076f02a67a87a79856e9583fc76aeb211c330 (patch) | |
tree | 80e9d226bbd700f26bb829fa35b7147b239948e7 /player | |
parent | 9ce45261399e2ee99f468c5016b378fd5360ae12 (diff) | |
download | mpv-9fe076f02a67a87a79856e9583fc76aeb211c330.tar.bz2 mpv-9fe076f02a67a87a79856e9583fc76aeb211c330.tar.xz |
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.
Diffstat (limited to 'player')
-rw-r--r-- | player/playloop.c | 2 |
1 files changed, 2 insertions, 0 deletions
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--; } } |