1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-21 07:16:56 +00:00
mpv/video
der richter cc09a28d96 mac: fix a race condition when updating the window title
the title is updated on the main thread (mandatory with cocoa)
asynchronously, because otherwise it would either deadlock when done
synchronously, lead to undefined behaviour or just crashes. the problem
here is that the c string was only copied to an NSString within that
asynchronous call, which potentially would access the pointer when it
is accessed, modified or freed by another thread. it is only safe to
access this pointer as long as the control callback wasn't returned yet.

to fix this we move the copying and creation of the String from the
c string pointer outside of the asynchronous call where the conversion
of an untyped pointer to a typed pointer is done too. since the
resulting String is a copy it's safe to be used in the asynchronous
call.

also reverting ee6ad40, since the problem was most likely an SDK problem
or the very same problem as mentioned here. i retested the crash case
again und can't reproduce it anymore. using a swift String again instead
of an NSSstring.

Fixes #12935
2023-11-25 19:31:26 +01:00
..
decode ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
filter various: replace some OOM handling 2023-11-24 10:04:55 +01:00
out mac: fix a race condition when updating the window title 2023-11-25 19:31:26 +01:00
csputils.c ALL: use pl_hdr_metadata and nuke sig_peak 2023-11-05 18:57:36 +01:00
csputils.h ALL: use pl_hdr_metadata and nuke sig_peak 2023-11-05 18:57:36 +01:00
cuda.c cuda: move --cuda-device to cuda_opts group 2023-09-22 14:20:38 +00:00
d3d.c vo: add missing return variable assignment 2023-11-18 23:55:28 +00:00
d3d.h
drmprime.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
fmt-conversion.c hwdec_vulkan: add Vulkan HW Interop 2023-05-28 15:46:05 -07:00
fmt-conversion.h
hwdec.c ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
hwdec.h hwtransfer: use the right hardware config to find conversion targets 2023-08-26 10:07:55 -07:00
image_loader.c
image_loader.h
image_writer.c image_writer: improve format conversion logging 2023-11-07 16:15:19 +01:00
image_writer.h video/image_writer: add avif screenshot support 2023-07-01 02:05:23 +00:00
img_format.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
img_format.h img_format: remove duplicated macros 2023-10-23 00:10:42 +00:00
mp_image_pool.c ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
mp_image_pool.h f_hwtransfer: disable vulkan multiplane images when uploading from cuda 2023-05-28 15:46:05 -07:00
mp_image.c ALL: use pl_hdr_metadata and nuke sig_peak 2023-11-05 18:57:36 +01:00
mp_image.h mp_image: add force_window field 2023-09-21 14:08:52 +00:00
repack.c
repack.h
sws_utils.c test: integrate unittests with meson 2023-03-02 15:45:27 +00:00
sws_utils.h
vaapi.c vaapi: add support for vaapi-win32 2023-11-22 11:43:20 +01:00
vaapi.h ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
vdpau_functions.inc
vdpau_mixer.c
vdpau_mixer.h options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vdpau.c ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
vdpau.h ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
zimg.c ALL: use pl_hdr_metadata and nuke sig_peak 2023-11-05 18:57:36 +01:00
zimg.h options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00