diff options
author | Leo Izen <leo.izen@gmail.com> | 2017-12-05 14:36:47 -0500 |
---|---|---|
committer | Leo Izen <leo.izen@gmail.com> | 2017-12-05 14:36:47 -0500 |
commit | 9513165c99c2ab3a945620b260823440f8ad125d (patch) | |
tree | b17128bac57a1fb2820d8fe08a55afc98d53cac8 /player/playloop.c | |
parent | f19797dea62ab9619a18a2ffab1b67bdafe55b8c (diff) | |
download | mpv-9513165c99c2ab3a945620b260823440f8ad125d.tar.bz2 mpv-9513165c99c2ab3a945620b260823440f8ad125d.tar.xz |
player/playloop.c: fix --loop-file without --start
I missed a check for MP_NOPTS_VALUE in 4efe330. Now
it should work as expected.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c index 61c9ad3b7b..bf1de03db5 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -779,8 +779,10 @@ static void handle_loop_file(struct MPContext *mpctx) // Do not attempt to loop-file if --ab-loop is active. else if (opts->loop_file && mpctx->stop_play == AT_END_OF_FILE) { double play_start_pts = get_play_start_pts(mpctx); + if (play_start_pts == MP_NOPTS_VALUE) + play_start_pts = 0; double play_end_pts = get_play_end_pts(mpctx); - if (play_start_pts < play_end_pts){ + if (play_end_pts == MP_NOPTS_VALUE || play_start_pts < play_end_pts){ mpctx->stop_play = KEEP_PLAYING; set_osd_function(mpctx, OSD_FFW); queue_seek(mpctx, MPSEEK_ABSOLUTE, play_start_pts, MPSEEK_EXACT, |