diff options
author | Dudemanguy <random342@airmail.cc> | 2024-01-23 10:10:35 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-02-15 16:43:11 +0000 |
commit | 4e5d996c3a3f74a7308aee53614c2b94c71daebc (patch) | |
tree | c0ace429c70f46a4e720495f9907e39d6a1bf238 /demux | |
parent | 25bba7c811fd203f4f9a8dfb1350e3bd79ed719e (diff) | |
download | mpv-4e5d996c3a3f74a7308aee53614c2b94c71daebc.tar.bz2 mpv-4e5d996c3a3f74a7308aee53614c2b94c71daebc.tar.xz |
player/sub: attempt to detect animated subtitles
The previous commits optimized sub redrawing on still images/terminal so
mpv wouldn't redraw so much. There is a gap though. It only assumes
static subtitles. Since ASS can be animated, those types of subtitles
will always need redraws so we need to build in specific detection for
this. We need to build a whitelist of events in ASS that are considered
animations and then flag the packet. Additionally, there's a bunch of
annoying bookkeeping that has to be done since packets can be dropped on
seeks and so on.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/packet.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/demux/packet.h b/demux/packet.h index 8e8d20c402..8087216355 100644 --- a/demux/packet.h +++ b/demux/packet.h @@ -59,6 +59,9 @@ typedef struct demux_packet { double start, end; // set to non-NOPTS iff segmented is set // subtitles only + bool animated; + bool seen; + int seen_pos; double sub_duration; // private |