summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-11-05 19:29:18 -0600
committerDudemanguy <random342@airmail.cc>2023-11-06 23:12:13 +0000
commit953176ee423445069bae49bf8e9bc36f4390de4c (patch)
treed2fd2be16491e6b066a61f8aa6acf1e8444f90cd /DOCS
parent7d004bf15c613a5553f38966adeb4d3bb6e589f8 (diff)
downloadmpv-953176ee423445069bae49bf8e9bc36f4390de4c.tar.bz2
mpv-953176ee423445069bae49bf8e9bc36f4390de4c.tar.xz
sub: adjust offsets when sub seeking/stepping
In the sub seek code path, there was an arbitrary small offset added to the pts before the seek. However when seeking backwards, the offset was an additional subtraction. de6eace6e984be3cd2515e9be6362a0cf04b7457 added this logic 10 years ago and perhaps it made sense then, but the additional subtraction when seeking backwards causes the subtitle seek to go too far to the previous subtitle if the durations overlap. This should always be an addition to work correctly. Additionally, the sub stepping code path also could use this offset for the same reason (duration overlaps). However, it is only applicable to sd_ass not sd_lavc. sd_lavc has step_sub support but on a sample it didn't even work anyway. Perhaps it only works for certain kinds of subtitles (patches welcome). Anyways instead of keeping this offset as a magic number, we can define it in sd.h which is handy for this. For sd_ass, we add the offset when sub stepping, and the offset is always added for sub seeking like it was before. Update the comment to be a little more relevant to what actually happens today. Fixes #11445.
Diffstat (limited to 'DOCS')
0 files changed, 0 insertions, 0 deletions