From a714f8e928ba01c595d4ac6812e2e611d3899f09 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 5 Mar 2016 12:45:54 +0100 Subject: 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. --- sub/sd_ass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub/sd_ass.c') diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 59336ff0ec..f8c9abebb2 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -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; } -- cgit v1.2.3