1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-30 02:52:10 +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 sub: fix undefined behavior in ASS color calculation 2014-05-10 10:44:16 +02:00
dec_sub.c sub: fix possible deadlock with --no-sub-ass and similar 2014-09-06 00:16:15 +02:00
dec_sub.h sub: uglify sub decoder with locking 2014-01-17 23:21:17 +01:00
draw_bmp.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
draw_bmp.h Rename sub.c/.h to osd.c/.h 2013-11-24 14:44:58 +01:00
find_subfiles.c build: include <strings.h> for strcasecmp() 2014-07-10 08:29:32 +02:00
find_subfiles.h vo: dropping subtitle files on the VO window adds them as subtitle files 2014-01-04 01:27:29 +01:00
img_convert.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
img_convert.h Revert "sub: support straight alpha additionally to premultiplied alpha" 2013-08-12 02:49:22 +02:00
osd_dummy.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
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_ass: disable special handling of subtitles with duration 0 2013-06-25 00:11:54 +02:00
sd_srt.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
sd.h demux_libass: change how external ASS subtitles are loaded 2014-03-15 22:17:51 +01:00