summaryrefslogtreecommitdiffstats
path: root/sub/sd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r--sub/sd_lavc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c
index d6f6bf8e48..563ac554fc 100644
--- a/sub/sd_lavc.c
+++ b/sub/sd_lavc.c
@@ -202,6 +202,9 @@ static void decode(struct sd *sd, struct demux_packet *packet)
if (prev->endpts == MP_NOPTS_VALUE || prev->endpts > pts)
prev->endpts = pts;
+ if (opts->sub_fix_timing && pts - prev->endpts <= SUB_GAP_THRESHOLD)
+ prev->endpts = pts;
+
for (int n = 0; n < priv->num_seekpoints; n++) {
if (priv->seekpoints[n].pts == prev->pts) {
priv->seekpoints[n].endpts = prev->endpts;