summaryrefslogtreecommitdiffstats
path: root/player/scripting.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-16 14:24:15 +0200
committerwm4 <wm4@nowhere>2016-09-16 14:39:45 +0200
commit03fec24e192ea1b5c0cf957a5a64c0db9d33e67a (patch)
tree75f58b93ce56c3f6cd3afdbd3ce028f93dcf35bb /player/scripting.c
parentb8ade7c99b830ee9870040bcfc1f2c3d3a64d172 (diff)
downloadmpv-03fec24e192ea1b5c0cf957a5a64c0db9d33e67a.tar.bz2
mpv-03fec24e192ea1b5c0cf957a5a64c0db9d33e67a.tar.xz
player: litter code with explicit wakeup calls
This does 3 kinds of changes: - change sleeptime=x to mp_set_timeout() - change sleeptime=0 to mp_wakeup_core() calls (to be more explicit) - change commands etc. to call mp_wakeup_core() if they do changes that require the playloop to be rerun This is preparation for the following changes. The goal is to process client API requests without having to rerun the playloop every time. As of this commit, the changes should not change behavior. In particular, the playloop is still implicitly woken up on every command.
Diffstat (limited to 'player/scripting.c')
-rw-r--r--player/scripting.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/scripting.c b/player/scripting.c
index cb35b1bfd7..afa567ca6a 100644
--- a/player/scripting.c
+++ b/player/scripting.c
@@ -97,6 +97,7 @@ static void wait_loaded(struct MPContext *mpctx)
{
while (!mp_clients_all_initialized(mpctx))
mp_idle(mpctx);
+ mp_wakeup_core(mpctx); // avoid lost wakeups during waiting
}
static void mp_load_script(struct MPContext *mpctx, const char *fname)