From b11bd1fe5e82fb7cd9aa912c2b1c98de8704bb87 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 1 Jun 2013 19:54:31 +0200 Subject: sub: make use of libavcodec subtitle converters This allows using some formats that were not supported until now, like WebVTT. We still prefer the internal subtitle reader (subreader.c), because 1. Libav, and 2. random things which we probably want to keep, such as control over formatting, codepage stuff, or various mysterious postprecessing done in that code. --- sub/sd_ass.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sub/sd_ass.c') diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 405cef323a..d8951df96f 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -254,6 +254,12 @@ static char *get_text(struct sd *sd, double pts) return ctx->last_text; } +static void fix_events(struct sd *sd) +{ + struct sd_ass_priv *ctx = sd->priv; + ctx->flush_on_seek = false; +} + static void reset(struct sd *sd) { struct sd_ass_priv *ctx = sd->priv; @@ -281,6 +287,7 @@ const struct sd_functions sd_ass = { .decode = decode, .get_bitmaps = get_bitmaps, .get_text = get_text, + .fix_events = fix_events, .reset = reset, .uninit = uninit, }; -- cgit v1.2.3