mirror of https://github.com/mpv-player/mpv
sd_ass: always clear subtitles on seek if duration unknown
Although there is logic to prune subtitles as soon as they get too old in this mode, this is not done for the _currently_ shown subtitles. Thus explicitly clearing subtitles on seek is required to avoid duplicate subtitles in certain cases when seeking.
This commit is contained in:
parent
a4dfc28fe1
commit
a714f8e928
|
@ -609,7 +609,7 @@ 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 || ctx->duration_unknown) {
|
||||
ass_flush_events(ctx->ass_track);
|
||||
ctx->num_seen_packets = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue