mirror of https://github.com/mpv-player/mpv
input: fix locking of mp_input_bind_key
This is a public function, yet its access to ictx through
get_bind_section is not locked.
Fixes: 4614d432a8
This commit is contained in:
parent
7b181c989e
commit
ce4294bc37
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue