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. --- core/mplayer.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'core') diff --git a/core/mplayer.c b/core/mplayer.c index 92c0f717af..1fae2eece8 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -1858,7 +1858,6 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl) if (!track->preloaded) { struct demux_stream *d_sub = sh_sub->ds; - const char *type = sh_sub->gsh->codec; bool non_interleaved = is_non_interleaved(mpctx, track); while (1) { @@ -1898,12 +1897,6 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl) mp_dbg(MSGT_CPLAYER, MSGL_V, "Sub: c_pts=%5.3f s_pts=%5.3f " "duration=%5.3f len=%d\n", curpts_s, subpts_s, duration, len); - if (type && strcmp(type, "mov_text") == 0) { - if (len < 2) - continue; - len = FFMIN(len - 2, AV_RB16(packet)); - packet += 2; - } struct demux_packet pkt = { .buffer = packet, .len = len, -- cgit v1.2.3