diff --git a/input/input.c b/input/input.c index 9fd2a16f0c..7ddd7df262 100644 --- a/input/input.c +++ b/input/input.c @@ -1459,6 +1459,7 @@ void mp_input_run_cmd(struct input_ctx *ictx, const char **cmd) void mp_input_bind_key(struct input_ctx *ictx, int key, bstr command) { + input_lock(ictx); struct cmd_bind_section *bs = get_bind_section(ictx, (bstr){0}); struct cmd_bind *bind = NULL; @@ -1493,6 +1494,7 @@ void mp_input_bind_key(struct input_ctx *ictx, int key, bstr command) bind->cmd, bind->location); talloc_free(s); } + input_unlock(ictx); } struct mpv_node mp_input_get_bindings(struct input_ctx *ictx)