summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-01 19:54:18 +0200
committerwm4 <wm4@nowhere>2013-06-03 22:40:02 +0200
commite19ffa02aa370cbc3b559f85b286ea09b06ab29b (patch)
tree3335cdcc8664d9e3b98631fe8128b138c095069a /demux
parent14dd95154820d4ec9afb5200335177b011233049 (diff)
downloadmpv-e19ffa02aa370cbc3b559f85b286ea09b06ab29b.tar.bz2
mpv-e19ffa02aa370cbc3b559f85b286ea09b06ab29b.tar.xz
sub: turn subassconvert_ functions into sub converters
This means subassconvert.c is split in sd_srt.c and sd_microdvd.c. Now this code is involved in the sub conversion chain like sd_movtext is. The invocation of the converter in sd_ass.c is removed. This requires some other changes to make the new sub converter code work with loading external subtitles. Until now, subtitles loaded via subreader.c was assumed to be in plaintext, or for some formats, in ASS (except in -no-ass mode). Then these were added to an ASS_Track. Change this so that subtitles are always in their original format (as far as decoders/converters for them are available), and turn every sub event read by subreader.c as packet to the dec_sub.c subtitle chain. This removes differences between external/demuxed and -ass/-no-ass code paths further.
Diffstat (limited to 'demux')
-rw-r--r--demux/stheader.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/demux/stheader.h b/demux/stheader.h
index 8220d65a61..421dfaf857 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -163,8 +163,9 @@ typedef struct sh_sub {
SH_COMMON
unsigned char *extradata; // extra header data passed from demuxer
int extradata_len;
- struct ass_track *track; // loaded by libass
- struct dec_sub *dec_sub; // decoder context
+ struct ass_track *track; // loaded by libass
+ struct sub_data *sub_data; // loaded by subreader.c
+ struct dec_sub *dec_sub; // decoder context
} sh_sub_t;
// demuxer.c: