mpv/demux
Dudemanguy 8f043de961 player/sub: avoid wasteful subtitle redraws
This only affects two special cases: printing subtitles to the terminal
and printing subtitles on a still picture. Previously, mpv was very dumb
here and spammed this logic on every single loop. For terminal
subtitles, this isn't as big of a deal, but for the image case this is
pretty bad. The entire VO constantly redrew even when there was no need
to which can be very expensive depending on user settings.

Instead, let's rework sub_read_packets so that it also tells us whether
or not the subtitle packets update in some way in addition to telling us
whether or not to read more. Since we cache all packets thanks to the
previous commit, we can leverage this information to make a guess
whether or not the current subtitle packet is supposed to be visible on
the screen. Because the redraw now only happens when it is needed, the
mp_set_timeout_hack can be removed.
2024-02-15 16:43:11 +00:00
..
cache.c demux: prepend some cache options with demuxer 2023-09-18 17:13:15 +00:00
cache.h
codec_tags.c various: replace dead links in comments 2024-02-11 04:01:24 +00:00
codec_tags.h Revert "demux: put type2format into codec_tags with helper functions" 2024-02-06 18:08:53 +01:00
cue.c
cue.h
demux.c demux: clarify the meaning of still_image 2024-02-11 04:01:04 +00:00
demux.h Revert "demux: improve stream selection state" 2023-09-30 09:02:57 -05:00
demux_cue.c demux_cue: deprecate --demuxer-cue-codepage for --metadata-codepage 2023-10-07 02:41:27 +00:00
demux_disc.c csputils: replace more primitives with pl_ 2024-01-22 14:54:55 +00:00
demux_edl.c
demux_lavf.c demux_lavf: detect ico as images 2024-01-19 23:56:21 +00:00
demux_libarchive.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
demux_mf.c demux_mf: detect webp 2024-02-06 18:08:53 +01:00
demux_mkv.c demux_mkv: add tags for A_MPEG/L1(mp1) audio 2024-02-10 12:38:59 +01:00
demux_mkv_timeline.c
demux_null.c
demux_playlist.c demux_playlist: simplify ini parsing 2023-11-14 14:59:48 +00:00
demux_raw.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
demux_timeline.c Revert "demux: improve stream selection state" 2023-09-30 09:02:57 -05:00
ebml.c build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
ebml.h build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
matroska.h
packet.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
packet.h player/sub: avoid wasteful subtitle redraws 2024-02-15 16:43:11 +00:00
stheader.h demux: clarify the meaning of still_image 2024-02-11 04:01:04 +00:00
timeline.c
timeline.h various: add missing include in header flles 2023-09-21 14:40:11 +00:00