mkv: preload Segments from the same family as a Segment with DVD chapter codec
authorSteve Lhomme <robUx4@videolabs.io>
Tue, 15 Mar 2016 07:50:22 +0000 (08:50 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Mar 2016 09:40:45 +0000 (10:40 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/chapter_command.hpp
modules/demux/mkv/mkv.cpp

index 3969735..bce3835 100644 (file)
@@ -27,6 +27,9 @@
 
 #include "mkv.hpp"
 
+const int MATROSKA_CHAPTER_CODEC_NATIVE  = 0x00;
+const int MATROSKA_CHAPTER_CODEC_DVD     = 0x01;
+
 const binary MATROSKA_DVD_LEVEL_SS   = 0x30;
 const binary MATROSKA_DVD_LEVEL_LU   = 0x2A;
 const binary MATROSKA_DVD_LEVEL_TT   = 0x28;
index de9bcef..93ad241 100644 (file)
@@ -138,6 +138,10 @@ static int Open( vlc_object_t * p_this )
     {
         p_stream->segments[i]->Preload();
         b_need_preload |= p_stream->segments[i]->b_ref_external_segments;
+        if ( p_stream->segments[i]->translations.size() &&
+             p_stream->segments[i]->translations[0]->codec_id == MATROSKA_CHAPTER_CODEC_DVD &&
+             p_stream->segments[i]->families.size() )
+            b_need_preload = true;
     }
 
     p_segment = p_stream->segments[0];