mirror of https://github.com/mpv-player/mpv
93de4c81b9
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. |
||
---|---|---|
.. | ||
lua | ||
timeline | ||
audio.c | ||
client.c | ||
client.h | ||
command.c | ||
command.h | ||
configfiles.c | ||
core.h | ||
discnav.c | ||
loadfile.c | ||
lua.c | ||
lua.h | ||
main.c | ||
main_fn.c | ||
misc.c | ||
osd.c | ||
playloop.c | ||
screenshot.c | ||
screenshot.h | ||
sub.c | ||
video.c |