summaryrefslogtreecommitdiffstats
path: root/sub/sd_ass.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-01 19:54:31 +0200
committerwm4 <wm4@nowhere>2013-06-03 22:40:06 +0200
commitb11bd1fe5e82fb7cd9aa912c2b1c98de8704bb87 (patch)
treebf29ab506fe835b33da2464a0053e0d461e5cb2e /sub/sd_ass.c
parente19ffa02aa370cbc3b559f85b286ea09b06ab29b (diff)
downloadmpv-b11bd1fe5e82fb7cd9aa912c2b1c98de8704bb87.tar.bz2
mpv-b11bd1fe5e82fb7cd9aa912c2b1c98de8704bb87.tar.xz
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.
Diffstat (limited to 'sub/sd_ass.c')
-rw-r--r--sub/sd_ass.c7
1 files changed, 7 insertions, 0 deletions
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,
};