mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
sd_lavc: remove small gaps between subtitles
Just like with text subtitles. Move the magic constants to a common place too.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user