diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-07 09:23:41 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-07 09:27:15 -0500 |
commit | a7185fbb605573b25d74aacb4f3802993bb89a93 (patch) | |
tree | f2a5ac8801f3f57d5c34d1de9f2daac6d7c1ac16 /sub/sd_lavc.c | |
parent | 499dce5ba127e8dde11e25d720881cb0646d55f9 (diff) | |
download | mpv-a7185fbb605573b25d74aacb4f3802993bb89a93.tar.bz2 mpv-a7185fbb605573b25d74aacb4f3802993bb89a93.tar.xz |
Revert "sd_lavc: use SUB_GAP_THRESHOLD for overlaps/gaps"
Yet another bad idea. It turns out that there's already a sub-fix-timing
option which logic for this exact thing (overlaps/gaps) fixing. Also it
works better than this since it doesn't appear to artifically increase
sub duration either. Fixes #12327.
This reverts commit 725b631ec3bdd5016072b5a6aa6a218fb87ffd11.
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r-- | sub/sd_lavc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 7d0a7ffc2e..e3a62da9f1 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -397,8 +397,8 @@ static struct sub *get_current(struct sd_lavc_priv *priv, double pts) if (!sub->valid) continue; if (pts == MP_NOPTS_VALUE || - ((sub->pts == MP_NOPTS_VALUE || pts + SUB_GAP_THRESHOLD >= sub->pts) && - (sub->endpts == MP_NOPTS_VALUE || pts - SUB_GAP_THRESHOLD <= sub->endpts))) + ((sub->pts == MP_NOPTS_VALUE || pts + 1e-6 >= sub->pts) && + (sub->endpts == MP_NOPTS_VALUE || pts < sub->endpts))) { // Ignore "trailing" subtitles with unknown length after 1 minute. if (sub->endpts == MP_NOPTS_VALUE && pts >= sub->pts + 60) |