MKV: support WebVTT subtitles embedded
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 15 Jul 2015 21:32:10 +0000 (23:32 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Sat, 12 Aug 2017 10:56:58 +0000 (11:56 +0100)
Gbp-Pq: Name 0010-MKV-support-WebVTT-subtitles-embedded.patch

modules/demux/mkv/matroska_segment_parse.cpp

index e8a68522183ae04c8b415dde2b263afd95f8ef0e..262020636e4ba9cb3f0416d50ee188ce57e7a499 100644 (file)
@@ -1837,6 +1837,11 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
     {
         p_tk->fmt.i_codec = VLC_CODEC_BD_PG;
     }
+    else if( !strcmp( p_tk->psz_codec, "D_WEBVTT/SUBTITLES" ) )
+    {
+        p_tk->fmt.i_codec = VLC_CODEC_SUBT;
+        p_tk->fmt.subs.psz_encoding = strdup( "UTF-8" );
+    }
     else if( !strcmp( p_tk->psz_codec, "B_VOBBTN" ) )
     {
         p_tk->fmt.i_cat = NAV_ES;