mpv/sub
Guido Cella 748504de52 sub: fix LRC lines with multiple timestamps
LRC subtitles can have lines with multiple timestamps, e.g.

[00:00.00][00:02.00]foo
[00:01.00]bar

Currently mpv shows only the "foo" that was decoded first, because it
compares the packet file position to check if a packet was already seen,
and it is the same for both occurrences of "foo". Fix this by also
comparing the pts.

This keeps comparing the packet position on top of the pts to not break
subtitle lines with the same timestamp, like:

1
00:00:00,000 --> 00:00:01,000
foo

2
00:00:00,000 --> 00:00:01,000
bar

where mpv shows both lines on top of each other. They are common in ASS
subtitles.

Fixes https://github.com/mpv-player/mpv/issues/13497.
2024-02-25 14:30:07 +01:00
..
ass_mp.c sub: add --sub-fonts-dir and --osd-fonts-dir options 2023-03-01 02:09:46 +00:00
ass_mp.h sub/ass_mp: filters/f_lavfi: forward declare mp_log 2023-09-21 14:40:11 +00:00
dec_sub.c player/sub: attempt to detect animated subtitles 2024-02-15 16:43:11 +00:00
dec_sub.h player/sub: avoid wasteful subtitle redraws 2024-02-15 16:43:11 +00:00
draw_bmp.c all: add missing repr assignments 2024-01-26 18:17:02 +02:00
draw_bmp.h csputils: replace mp_alpha_type with pl_alpha_mode 2024-01-22 14:54:55 +00:00
filter_jsre.c sub: jsre filter: abort init early on empty filter list 2022-06-09 14:38:24 +03:00
filter_regex.c sub: sub-filter-regex and jsre: support ass-to-plaintext 2021-08-05 21:32:22 +03:00
filter_sdh.c filter_sdh: optimize get_char_bytes 2024-01-15 16:05:17 +00:00
img_convert.c various: replace some OOM handling 2023-11-24 10:04:55 +01:00
img_convert.h sub: move RGBA scaling to vo_vaapi 2016-07-03 19:32:43 +02:00
lavc_conv.c sub/lavc_conv: properly fill avctx with codecpar values at init 2023-03-14 23:59:47 +02:00
meson.build build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
osd.c ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
osd.h sub: add --sub-fonts-dir and --osd-fonts-dir options 2023-03-01 02:09:46 +00:00
osd_font.otf osc: use custom symbols for window controls 2019-12-11 13:53:10 -08:00
osd_libass.c options: add --osd-bar-border-size 2023-11-27 15:02:28 +00:00
osd_state.h ALL: use new mp_thread abstraction 2023-11-05 17:36:17 +00:00
sd.h command: fix sub-seek while paused without a video 2024-02-23 21:37:22 +01:00
sd_ass.c sub: fix LRC lines with multiple timestamps 2024-02-25 14:30:07 +01:00
sd_lavc.c player/sub: avoid wasteful subtitle redraws 2024-02-15 16:43:11 +00:00