static void reset(struct sd *sd) { struct sd_ass_priv *ctx = sd->priv; if (ctx->flush_on_seek) ass_flush_events(ctx->ass_track); ctx->flush_on_seek = false; }
static void fill_plaintext(struct sd *sd, double pts) { struct sd_ass_priv *ctx = sd->priv; ASS_Track *track = ctx->shadow_track; ass_flush_events(track); char *text = get_text(sd, pts); if (!text) return; bstr dst = {0}; while (*text) { if (*text == '{') bstr_xappend(NULL, &dst, bstr0("\\")); bstr_xappend(NULL, &dst, (bstr){text, 1}); // Break ASS escapes with U+2060 WORD JOINER if (*text == '\\') mp_append_utf8_bstr(NULL, &dst, 0x2060); text++; } if (!dst.start || !dst.start[0]) return; int n = ass_alloc_event(track); ASS_Event *event = track->events + n; event->Start = 0; event->Duration = INT_MAX; event->Style = track->default_style; event->Text = strdup(dst.start); if (track->default_style < track->n_styles) track->styles[track->default_style].Alignment = ctx->on_top ? 6 : 2; }
void SubtitleScreen::ClearAllSubtitles(void) { ClearNonDisplayedSubtitles(); ClearDisplayedSubtitles(); #ifdef USING_LIBASS if (m_assTrack) ass_flush_events(m_assTrack); #endif }
static void reset(struct sd *sd) { struct sd_ass_priv *ctx = sd->priv; if (ctx->flush_on_seek || sd->opts->sub_clear_on_seek) { ass_flush_events(ctx->ass_track); ctx->extend_event = -1; } ctx->flush_on_seek = false; }
static void reset(struct sd *sd) { struct sd_ass_priv *ctx = sd->priv; if (sd->opts->sub_clear_on_seek) { ass_flush_events(ctx->ass_track); ctx->num_seen_packets = 0; } if (ctx->converter) lavc_conv_reset(ctx->converter); }
static void reset(struct sd *sd) { struct sd_ass_priv *ctx = sd->priv; if (sd->opts->sub_clear_on_seek || ctx->duration_unknown) { ass_flush_events(ctx->ass_track); ctx->num_seen_packets = 0; sd->preload_ok = false; } if (ctx->converter) lavc_conv_reset(ctx->converter); }
void LibASS::flushASSEvents() { if (!ass_sub_track || !ass_sub_renderer) return; ass_flush_events(ass_sub_track); }