summaryrefslogtreecommitdiffstats
path: root/core
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 /core
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 'core')
-rw-r--r--core/mplayer.c7
1 files changed, 0 insertions, 7 deletions
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,