From 1f1d2d5f49deca9f8119ab6aa45264d5d6a6b02d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 Dec 2019 14:18:10 +0100 Subject: 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. --- player/playloop.c | 5 +++-- 1 file 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) -- cgit v1.2.3