1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:42:17 +00:00
mpv/input
wm4 93de4c81b9 stream: make mp_input_check_interrupt thread-safe
The interrupt callback will can be called from another thread if the
cache is enabled, and the stream disconnects. Then stream_reconnect()
will call this function from within the cache thread.

mp_input_check_interrupt() is not thread-safe due to read_events() not
being thread-safe. It will call input callbacks added with
mp_input_add_fd() - these callbacks lead to code not protected by locks,
such as reading X11 events.

Solve this by adding a stupid hack, which checks whether the calling
thread is the main playback thread (i.e. calling the input callbacks
will be safe). We can remove this hack later, but it requires at least
moving the VO to its own thread first.
2014-04-25 19:13:03 +02:00
..
cmd_list.c player: rename dvdnav to discnav 2014-03-30 11:42:49 +09:00
cmd_list.h player: rename dvdnav to discnav 2014-03-30 11:42:49 +09:00
cmd_parse.c command: fix loadfile command 2014-02-24 23:02:20 +01:00
cmd_parse.h
event.c input: change mp_input_run_cmd signature 2014-01-04 19:42:16 +01:00
event.h video/out: remove some code duplication between X11 and wayland 2014-01-04 19:33:40 +01:00
input.c stream: make mp_input_check_interrupt thread-safe 2014-04-25 19:13:03 +02:00
input.h stream: make mp_input_check_interrupt thread-safe 2014-04-25 19:13:03 +02:00
joystick.c Kill all tabs 2014-04-13 18:03:01 +02:00
joystick.h
keycodes.c keycodes: add const to a function argument 2014-02-17 02:52:58 +01:00
keycodes.h input: keycodes: reorder flags 2014-04-18 17:50:36 +02:00
lirc.c Kill all tabs 2014-04-13 18:03:01 +02:00
lirc.h