summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-12-14 14:18:10 +0100
committerwm4 <wm4@nowhere>2019-12-14 14:18:10 +0100
commit1f1d2d5f49deca9f8119ab6aa45264d5d6a6b02d (patch)
tree2c3f33576c6c54060bbdae6e63fa5c75b93387b8
parent57fbc9cd76f7a78f1034c42dd3c453ff35123264 (diff)
downloadmpv-1f1d2d5f49deca9f8119ab6aa45264d5d6a6b02d.tar.bz2
mpv-1f1d2d5f49deca9f8119ab6aa45264d5d6a6b02d.tar.xz
player: move point at which queued seeks are applied
Do it after decoding etc., but before waiting for input. This seems to make more sense, because whether a queued seek can be applied depends on the playback state. So it sounds like a good idea to apply the seek first thing, but it's a bad idea to go to sleep if there's still a queued seek pending (that couldn't be processed earlier). Also add an empty line before mp_wait_events(); it doesn't really have to do with the filter bullshit.
-rw-r--r--player/playloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c
index 20580a95ab..ff049b56ca 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -1239,6 +1239,8 @@ void run_playloop(struct MPContext *mpctx)
update_core_idle_state(mpctx);
+ execute_queued_seek(mpctx);
+
if (mpctx->stop_play)
return;
@@ -1246,6 +1248,7 @@ void run_playloop(struct MPContext *mpctx)
if (mp_filter_run(mpctx->filter_root))
mp_wakeup_core(mpctx);
+
mp_wait_events(mpctx);
handle_update_cache(mpctx);
@@ -1255,8 +1258,6 @@ void run_playloop(struct MPContext *mpctx)
handle_chapter_change(mpctx);
handle_force_window(mpctx, false);
-
- execute_queued_seek(mpctx);
}
void mp_idle(struct MPContext *mpctx)