1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 09:25:56 +00:00
mpv/sub
wm4 197f18402e sub: fix possible deadlock with --no-sub-ass and similar
This is a deadlock caused by a lock order issue: sub/osd.c locks the OSD
first, then the subtitle decoder lock. player/sub.c does the reverse.

Fix this by discussing away the requirement for locking (see below),
which allows us to drop the broken sub lock. sub_get_text() still
acquires and releases the sub decoder lock, but it's not held at the
same time as the OSD lock anymore, so it should be fine.

Originally, the sub lock was acquired because sub_get_text() returns a
pointer to a mutable string. We simply declare that it's ok to call it
unlocked, as long as only 1 thread accesses it, which works out fine in
this case.
2014-09-06 00:16:15 +02:00
..
ass_mp.c ass: remove some pointless ifdeffery 2014-07-22 20:49:01 +02:00
ass_mp.h
dec_sub.c sub: fix possible deadlock with --no-sub-ass and similar 2014-09-06 00:16:15 +02:00
dec_sub.h
draw_bmp.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
draw_bmp.h
find_subfiles.c build: include <strings.h> for strcasecmp() 2014-07-10 08:29:32 +02:00
find_subfiles.h
img_convert.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
img_convert.h
osd_dummy.c
osd_font.otf osd+osc: Add left-arrow to osd-font 2014-08-21 18:45:41 +02:00
osd_libass.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
osd_state.h video/out: change aspects of OSD handling 2014-06-15 20:53:15 +02:00
osd.c Revert "Remove DVD and Bluray support" 2014-07-15 01:49:02 +02:00
osd.h Revert "Remove DVD and Bluray support" 2014-07-15 01:49:02 +02:00
sd_ass.c sub: add option to workaround broken mkv files 2014-08-14 23:59:35 +02:00
sd_lavc_conv.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
sd_lavc.c sd_lavc: remove ineffective code 2014-08-24 12:26:34 +02:00
sd_lavf_srt.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
sd_microdvd.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
sd_movtext.c
sd_srt.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
sd.h