mirror of https://github.com/mpv-player/mpv
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 725b631ec3
.
This commit is contained in:
parent
499dce5ba1
commit
a7185fbb60
|
@ -397,8 +397,8 @@ static struct sub *get_current(struct sd_lavc_priv *priv, double pts)
|
||||||
if (!sub->valid)
|
if (!sub->valid)
|
||||||
continue;
|
continue;
|
||||||
if (pts == MP_NOPTS_VALUE ||
|
if (pts == MP_NOPTS_VALUE ||
|
||||||
((sub->pts == MP_NOPTS_VALUE || pts + SUB_GAP_THRESHOLD >= sub->pts) &&
|
((sub->pts == MP_NOPTS_VALUE || pts + 1e-6 >= sub->pts) &&
|
||||||
(sub->endpts == MP_NOPTS_VALUE || pts - SUB_GAP_THRESHOLD <= sub->endpts)))
|
(sub->endpts == MP_NOPTS_VALUE || pts < sub->endpts)))
|
||||||
{
|
{
|
||||||
// Ignore "trailing" subtitles with unknown length after 1 minute.
|
// Ignore "trailing" subtitles with unknown length after 1 minute.
|
||||||
if (sub->endpts == MP_NOPTS_VALUE && pts >= sub->pts + 60)
|
if (sub->endpts == MP_NOPTS_VALUE && pts >= sub->pts + 60)
|
||||||
|
|
Loading…
Reference in New Issue