diff options
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c index f5c1fde0ef..26f9f12d82 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -92,6 +92,16 @@ void mp_wakeup_core_cb(void *ctx) mp_wakeup_core(mpctx); } +void mp_core_lock(struct MPContext *mpctx) +{ + mp_dispatch_lock(mpctx->dispatch); +} + +void mp_core_unlock(struct MPContext *mpctx) +{ + mp_dispatch_unlock(mpctx->dispatch); +} + // Process any queued input, whether it's user input, or requests from client // API threads. This also resets the "wakeup" flag used with mp_wait_events(). void mp_process_input(struct MPContext *mpctx) @@ -100,8 +110,7 @@ void mp_process_input(struct MPContext *mpctx) mp_cmd_t *cmd = mp_input_read_cmd(mpctx->input); if (!cmd) break; - run_command(mpctx, cmd, NULL); - mp_cmd_free(cmd); + run_command(mpctx, cmd, NULL, NULL); } mp_set_timeout(mpctx, mp_input_get_delay(mpctx->input)); } |