1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-22 11:18:32 +00:00
mpv/sub
wm4 c9d376acd8 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-05-17 18:52:22 +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-05-17 18:52:22 +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 filter_sdh: remove pointless set_pos function 2017-04-20 08:22:46 +02: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 lavc_conv: do not allow libavcodec to drop subtitles with broken UTF-8 2018-03-26 23:06:51 -07: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-10-19 11:06:56 +02: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 options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
sd_lavc.c sd_lavc: fix some obscure UB 2019-01-20 17:29:33 +01:00
sd.h options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00