diff options
author | wm4 <wm4@nowhere> | 2015-12-20 10:14:14 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-20 10:14:14 +0100 |
commit | f1a2610c4fcb1a943bf64f3a737afcf1b9c0bfdb (patch) | |
tree | 3dcc265a099d3a440cb089ee67fd5493e311e3d9 /sub/sd_ass.c | |
parent | 2da533bec362ea97db12ffe43173e374c7592254 (diff) | |
download | mpv-f1a2610c4fcb1a943bf64f3a737afcf1b9c0bfdb.tar.bz2 mpv-f1a2610c4fcb1a943bf64f3a737afcf1b9c0bfdb.tar.xz |
sd_ass: handle --sub-clear-on-seek correctly with non-ASS subs
Converted subtitles use a different method to avoid adding repeated
packets as duplicate subtitle events. The state for this mechanism must
be cleared as well if --sub-clear-on-seek is used.
Diffstat (limited to 'sub/sd_ass.c')
-rw-r--r-- | sub/sd_ass.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 32179c843d..16275207b7 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -513,8 +513,10 @@ static void fill_plaintext(struct sd *sd, double pts) static void reset(struct sd *sd) { struct sd_ass_priv *ctx = sd->priv; - if (sd->opts->sub_clear_on_seek) + if (sd->opts->sub_clear_on_seek) { ass_flush_events(ctx->ass_track); + ctx->num_seen_packets = 0; + } if (ctx->converter) lavc_conv_reset(ctx->converter); } |