diff options
author | wm4 <wm4@nowhere> | 2013-08-24 15:17:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-08-24 15:17:37 +0200 |
commit | 402f85f7f28842175f6a4ca2812e63d042506308 (patch) | |
tree | 8d90ebbe622c870073af583a8901c6791dd9e484 /demux | |
parent | 0d8a62c08da87f6cfb5c45a86ee87c414c33323e (diff) | |
download | mpv-402f85f7f28842175f6a4ca2812e63d042506308.tar.bz2 mpv-402f85f7f28842175f6a4ca2812e63d042506308.tar.xz |
sub: add webvtt-in-webm support
The way this was added to FFmpeg is less than ideal, because it requires
text parsing in the Matroska demuxer. But in order to use the FFmpeg
webvtt-to-ass converter, we still have to mimic this in some way. We do
this by putting the parsing into sd_lavc_conv.c, before the subtitle
packet is passed to libavcodec. At least this keeps the ugliness out of
unrelated code.
There is some change that FFmpeg will fix their design eventually.
Instead of rewriting the parsing code, we simply borrow it from FFmpeg's
Matroska demuxer.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv.c | 2 | ||||
-rw-r--r-- | demux/matroska.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index be356585e3..3e902c0ea3 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1614,6 +1614,8 @@ static const char *mkv_sub_tag[][2] = { { MKV_S_TEXTASCII, "subrip"}, { MKV_S_TEXTUTF8, "subrip"}, { MKV_S_PGS, "hdmv_pgs_subtitle"}, + { MKV_S_WEBVTT_S, "webvtt-webm"}, + { MKV_S_WEBVTT_C, "webvtt-webm"}, {0} }; diff --git a/demux/matroska.h b/demux/matroska.h index 7682ead7a7..baadc84a97 100644 --- a/demux/matroska.h +++ b/demux/matroska.h @@ -88,5 +88,7 @@ #define MKV_S_PGS "S_HDMV/PGS" #define MKV_S_SSA "S_SSA" // Deprecated #define MKV_S_ASS "S_ASS" // Deprecated +#define MKV_S_WEBVTT_S "D_WEBVTT/SUBTITLES" +#define MKV_S_WEBVTT_C "D_WEBVTT/CAPTIONS" #endif /* MPLAYER_MATROSKA_H */ |