mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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.
This commit is contained in:
@@ -513,8 +513,10 @@ static void fill_plaintext(struct sd *sd, double pts)
|
|||||||
static void reset(struct sd *sd)
|
static void reset(struct sd *sd)
|
||||||
{
|
{
|
||||||
struct sd_ass_priv *ctx = sd->priv;
|
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);
|
ass_flush_events(ctx->ass_track);
|
||||||
|
ctx->num_seen_packets = 0;
|
||||||
|
}
|
||||||
if (ctx->converter)
|
if (ctx->converter)
|
||||||
lavc_conv_reset(ctx->converter);
|
lavc_conv_reset(ctx->converter);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user