mpv/player
wm4 a2e7642d3c sub: allow feeding bitmap subs in advance
Until now, feeding packets to the decoder in advance was done for text
subtitles only. This was possible because libass buffers all subtitle
data anyway (in ASS_Track). sd_lavc, responsible for bitmap subs, does
not do this. But it can buffer a small number of subtitle frames ahead.
Enable this.

Repurpose the sub_accept_packets_in_advance(). Instead of "can take all
packets" it means "can take 1 packet" now. (The old meaning is still
needed locally in dec_sub.c; keep it there.) It asks the decoder whether
there is place for at least 1 subtitle packet. sd_lavc implements it and
returns true if its internal fixed-size subtitle queue still has a free
slot. (The implementation of this in dec_sub.c isn't entirely clean.
For one, decode_chain() ignores this mechanism, so it's implied that
bitmap subtitles do not use the subtitle filter chain in any advanced
way.)

Also fix 2 bugs in the sd_lavc queue handling. Subtitles must be checked
in reverse, because the first entry will often have endpts==NOPTS, which
would always match. alloc_sub() must cycle the queue buffer, because it
reuses memory allocations (like sub.imgs) by design.
2015-12-05 23:54:00 +01:00
..
lua ytdl: disable --all-subs if "sub-lang" is in raw-options 2015-10-24 17:30:22 +02:00
audio.c player: use demuxer ts offset to simplify timeline ts handling 2015-11-16 23:17:33 +01:00
client.c client API: disallow masking MPV_EVENT_SHUTDOWN 2015-12-02 23:08:43 +01:00
client.h vo_opengl_cb: don't render OSD while VO is not created 2015-03-23 16:32:59 +01:00
command.c command, vo: add estimated-display-fps property 2015-11-25 22:07:56 +01:00
command.h video: always re-probe auto deint filter on filter reconfig 2015-07-21 21:54:15 +02:00
configfiles.c command: make time properties unavailable if timestamp is unknown 2015-10-16 16:16:10 +02:00
core.h player: always disable display-sync on desyncs 2015-11-27 14:40:52 +01:00
external_files.c external_files: deduplicate bstr functions 2015-11-09 22:41:19 -08:00
external_files.h player: rename and move find_subfiles.c 2015-09-20 18:05:06 +02:00
loadfile.c player: make timeline switching slightly nicer 2015-11-18 20:58:07 +01:00
lua.c osd: delay libass initialization as far as possible 2015-09-07 14:26:01 +02:00
main.c options: handle terminal/logging settings eagerly 2015-11-04 21:49:54 +01:00
misc.c win32: don't show progress indicator in idle mode 2015-11-23 19:50:13 +11:00
osd.c osd: do not let OSD messages overwrite --osd-msgN text 2015-11-29 17:56:08 +01:00
playloop.c player: make timeline switching slightly nicer 2015-11-18 20:58:07 +01:00
screenshot.c screenshot: avoid confusing template error message with no file 2015-09-02 10:34:36 +02:00
screenshot.h client API: add a screenshot_raw command 2015-04-20 23:11:03 +02:00
scripting.c path: make mp_path_join accept normal C strings 2015-05-09 15:26:47 +02:00
sub.c sub: allow feeding bitmap subs in advance 2015-12-05 23:54:00 +01:00
video.c player: remove redundant check 2015-12-05 23:53:48 +01:00