summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorLeo Izen <leo.izen@gmail.com>2017-12-28 10:23:12 -0500
committerKevin Mitchell <kevmitch@gmail.com>2017-12-31 17:02:55 -0700
commit4a6bb492151358afa4c5ae22a2497490dbb73e12 (patch)
tree61500ea459faa134742d1a2c291f5fb8167e6123 /player
parentff506c1e49982a8c705fd49d57d8df8ad55a9c2e (diff)
downloadmpv-4a6bb492151358afa4c5ae22a2497490dbb73e12.tar.bz2
mpv-4a6bb492151358afa4c5ae22a2497490dbb73e12.tar.xz
player/playloop.c: Revert --loop-file and --start interaction
This reverts commit 9513165c99c2ab3a945620b260823440f8ad125d and commit 4efe330efba296f6f07089d60087ef4e054bfe04. I had changed --loop-file to interact with --start to work the same way that --loop-playlist does. (That is, --loop-file seeks to the --start time upon looping, not the beginning of the file.) However, the consensus is that the old behavior is preferred and the interaction with --loop-playlist is the one that is incorrect. In addition, this change introduced a bug in the interaction between Quit-Watch-Later and --loop-file, where upon reaching playback end it would seek to the resume timestamp, not the start of the file. As a result, this commit reverts that change.
Diffstat (limited to 'player')
-rw-r--r--player/playloop.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 245b49217e..46e93dd64a 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -781,19 +781,11 @@ 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_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,
- MPSEEK_FLAG_NOFLUSH);
- if (opts->loop_file > 0)
- opts->loop_file--;
- }
-
+ mpctx->stop_play = KEEP_PLAYING;
+ set_osd_function(mpctx, OSD_FFW);
+ queue_seek(mpctx, MPSEEK_ABSOLUTE, 0, MPSEEK_DEFAULT, MPSEEK_FLAG_NOFLUSH);
+ if (opts->loop_file > 0)
+ opts->loop_file--;
}
}