From e4fb23ed7de874bb2d05824d7edb84cfd1b21101 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 12 May 2018 18:46:37 +0200 Subject: command: add a way to abort asynchronous commands Many asynchronous commands are potentially long running operations, such as loading something from network or running a foreign process. Obviously it shouldn't just be possible for them to freeze the player if they don't terminate as expected. Also, there will be situations where you want to explicitly stop some of those operations explicitly. So add an infrastructure for this. Commands have to support this explicitly. The next commit uses this to actually add support to a command. --- player/playloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 26f9f12d82..a784bfd554 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -110,7 +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, NULL); + run_command(mpctx, cmd, NULL, NULL, NULL); } mp_set_timeout(mpctx, mp_input_get_delay(mpctx->input)); } -- cgit v1.2.3