diff options
author | wm4 <wm4@nowhere> | 2016-03-05 12:45:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-05 13:08:38 +0100 |
commit | a714f8e928ba01c595d4ac6812e2e611d3899f09 (patch) | |
tree | 0410f64b0880161d25d00180a6c6ac730cc667d9 /sub/sd_ass.c | |
parent | a4dfc28fe1fd67a5ae303aed8019891091df2700 (diff) | |
download | mpv-a714f8e928ba01c595d4ac6812e2e611d3899f09.tar.bz2 mpv-a714f8e928ba01c595d4ac6812e2e611d3899f09.tar.xz |
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.
Diffstat (limited to 'sub/sd_ass.c')
-rw-r--r-- | sub/sd_ass.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |