From 3000df35d31f09f13a7c662e2f96bcd7d0f6ac13 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 1 Jun 2013 19:44:55 +0200 Subject: sub: basic subtitle converters Add a basic infrastructure for subtitle converters. These converters work sort-of like decoders, except that they produce packets instead of subtitle bitmaps. They are put in front of actual decoders. Start with sd_movtext. 4 lines of code are blown up to a 55 lines file, but fortunately this is not going to be that bad for the following converters. --- sub/sd_ass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sub/sd_ass.c') diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 2ebd2164be..78adbf4863 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -53,8 +53,7 @@ static bool is_text_sub(const char *t) { return t && (is_ass_sub(t) || strcmp(t, "text") == 0 || - strcmp(t, "subrip") == 0 || - strcmp(t, "mov_text") == 0); + strcmp(t, "subrip") == 0); } static bool supports_format(const char *format) @@ -296,7 +295,7 @@ const struct sd_functions sd_ass = { struct ass_track *sub_get_ass_track(struct dec_sub *sub) { - struct sd *sd = sub_get_sd(sub); + struct sd *sd = sub_get_last_sd(sub); if (sd && sd->driver == &sd_ass && sd->priv) { struct sd_ass_priv *ctx = sd->priv; return ctx->ass_track; -- cgit v1.2.3