diff options
author | wm4 <wm4@nowhere> | 2015-06-16 23:11:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-16 23:11:14 +0200 |
commit | 72808be6f857ae7d66d5adb87568acf3f9159ade (patch) | |
tree | 4ab2cae1f5ce845d37fb60f06697d61f3037780d /player/playloop.c | |
parent | dbdc46c97a32c53d41a19908aa365e7d81025c3e (diff) | |
download | mpv-72808be6f857ae7d66d5adb87568acf3f9159ade.tar.bz2 mpv-72808be6f857ae7d66d5adb87568acf3f9159ade.tar.xz |
command: do not exit playback if the B point of A-B loop is past EOF
The previous behavior is confusing if the B point is near EOF (consider
B being the duration of the file, which is strictly speaking past the
last video timestamp). The new behavior is fine as well for B being far
past EOF.
Achieve this by checking the EOF state in addition to whether playback
has reached the B point. Also, move the A-B loop code out of
command_event(). It just isn't useful anymore, and obfuscates the code
more than it makes it loop simple.
Fixes #2046.
Diffstat (limited to 'player/playloop.c')
-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 03be7df80a..2b389def22 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -1043,6 +1043,8 @@ void run_playloop(struct MPContext *mpctx) handle_loop_file(mpctx); + handle_ab_loop(mpctx); + handle_keep_open(mpctx); handle_sstep(mpctx); |