1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00
mpv/sub
wm4 287166b02e sub: remove only user of demux_read_packet()
There are 3 packet reading functions in the demux API, which all
function completely differently. One of them, demux_read_packet(), has
only 1 caller, which is in dec_sub.c. Change this caller to use
demux_read_packet_async() instead. Since it really wants to do a
blocking call, setup some proper waiting. This uses mp_dispatch_queue,
because even though it's overkill, it needs the least code.

In practice, waiting actually never happens. This code is only called on
code paths where everything is already read into memory (libavformat's
subtitle demuxers simply behave this way). It's still a bit of a
"coincidence", so implement it properly anyway.

If suubtitle decoder init fails, we still need to unset the demuxer
wakeup callback. Add a sub_destroy() call to the failure path. This also
happens to fix a missed pthread_mutex_destroy() call (in practice this
was a nop, or a memory leak on BSDs).
2019-09-19 20:37:04 +02:00
..
ass_mp.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
ass_mp.h ass_mp: change license to LGPL 2017-04-20 12:53:09 +02:00
dec_sub.c sub: remove only user of demux_read_packet() 2019-09-19 20:37:04 +02:00
dec_sub.h options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
draw_bmp.c mp_image: split colorimetry metadata into its own struct 2016-07-03 19:42:52 +02:00
draw_bmp.h csputils: get rid of mp_csp_details 2015-01-06 16:50:58 +01:00
filter_sdh.c sub: recognize UTF-8 characters in SDH subtitle filter 2019-03-02 02:05:58 +01:00
img_convert.c sub: move RGBA scaling to vo_vaapi 2016-07-03 19:32:43 +02:00
img_convert.h sub: move RGBA scaling to vo_vaapi 2016-07-03 19:32:43 +02:00
lavc_conv.c sub/sd_ass: utilize UINT32_MAX subtitle duration for unknown 2019-09-19 00:02:03 +03:00
osd_dummy.c command: shorten long playlists on OSD 2017-01-26 18:24:53 +01:00
osd_font.otf osd-font: make volume muted glyph slightly thicker 2017-04-22 18:03:16 +01:00
osd_libass.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
osd_state.h options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
osd.c osd: another shitty pointless UB 2018-12-06 10:34:06 +01:00
osd.h vo_opengl: don't discard buffered video on redundant resize calls 2017-08-29 15:15:34 +02:00
sd_ass.c sub/sd_ass: always set the libass track type to TRACK_TYPE_ASS 2019-09-19 00:02:03 +03:00
sd_lavc.c sd_lavc: fix some obscure UB 2019-09-19 20:37:04 +02:00
sd.h sub/lavc_conv: switch to the newer "ass" subtitle decoding mode 2019-09-19 00:02:03 +03:00