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:
wm4 2016-03-05 12:45:54 +01:00
parent a4dfc28fe1
commit a714f8e928
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}