summaryrefslogtreecommitdiffstats
path: root/sub/sd_ass.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-01 19:44:55 +0200
committerwm4 <wm4@nowhere>2013-06-03 02:09:07 +0200
commit3000df35d31f09f13a7c662e2f96bcd7d0f6ac13 (patch)
tree64ce19abc28e21cc9a17ed66045433de0342221b /sub/sd_ass.c
parent02ce316ade9ba932ad405383278d6b01c54e5fc4 (diff)
downloadmpv-3000df35d31f09f13a7c662e2f96bcd7d0f6ac13.tar.bz2
mpv-3000df35d31f09f13a7c662e2f96bcd7d0f6ac13.tar.xz
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.
Diffstat (limited to 'sub/sd_ass.c')
-rw-r--r--sub/sd_ass.c5
1 files changed, 2 insertions, 3 deletions
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;