1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 12:55:16 +00:00
mpv/player
wm4 3d88e6f4c2 client API: fix potential sporadic freezes on termination
Although this was never observed to be happening, it seems definitely
possible: we first tell the main thread to exit, and then we ask the
main thread to do some work for us (with mp_dispatch_run()). Obviously
this is racy, and the main thread could exit without doing this, which
would block mp_dispatch_run() forever.

Fix this by changing the order of operation, so that it makes sense.

We could also just store the pthread_t of the main thread in some
variable, but the fact that pthread_create() might set the pthread_t
argument _after_ starting the thread makes this a bit messy (at least it
doesn't seem to be guaranteed on a superficial look at the manpage).
2018-04-16 01:22:05 +03:00
..
javascript js: use new hooks API (match f60826c3) 2018-04-07 16:02:20 -07:00
lua ytdl_hook: don't log error when loading is aborted 2018-04-15 21:07:13 +03:00
audio.c audio: don't recreate AO if a filter changes the output format 2018-04-15 23:11:33 +03:00
client.c client API: fix potential sporadic freezes on termination 2018-04-16 01:22:05 +03:00
client.h client API: add a first class hook API, and deprecate old API 2018-03-26 23:02:23 -07:00
command.c player: fix hook processing consistency and code duplication issues 2018-03-26 23:06:50 -07:00
command.h player: fix hook processing consistency and code duplication issues 2018-03-26 23:06:50 -07:00
configfiles.c player: silence config file loading message on resuming 2018-01-13 03:26:45 -08:00
core.h client API: cleanup mpv_handle termination 2018-03-15 00:00:04 -07:00
external_files.c player: make track language matching case insensitive 2017-12-23 15:14:13 -07:00
external_files.h external_files: change license to LGPL 2017-06-20 14:22:10 +02:00
javascript.c js: use new hooks API (match f60826c3) 2018-04-07 16:02:20 -07:00
loadfile.c player: fix hook processing consistency and code duplication issues 2018-03-26 23:06:50 -07:00
lua.c client API: add a first class hook API, and deprecate old API 2018-03-26 23:02:23 -07:00
main.c client API: cleanup mpv_handle termination 2018-03-15 00:00:04 -07:00
misc.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
osd.c video: make decoder wrapper a filter 2018-01-30 03:10:27 -08:00
playloop.c client API: deprecate opengl-cb API and introduce a replacement API 2018-02-28 00:55:06 -08:00
screenshot.c vo_gpu: make screenshots use the GL renderer 2018-02-11 17:45:51 -08:00
screenshot.h player: make screenshot commands honor the async flag 2017-04-01 20:47:23 +02:00
scripting.c client API: add a first class hook API, and deprecate old API 2018-03-26 23:02:23 -07:00
sub.c video: make decoder wrapper a filter 2018-01-30 03:10:27 -08:00
video.c vo: pass through framedrop flag differently 2018-03-15 23:13:53 -07:00