[vlc-commits] mkv: preload Segments from the same family as a Segment with DVD chapter codec
Steve Lhomme
git at videolan.org
Tue Mar 15 10:41:19 CET 2016
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Mar 15 08:50:22 2016 +0100| [5ed136d776df267588e9a939fec4bb69889f998d] | committer: Jean-Baptiste Kempf
mkv: preload Segments from the same family as a Segment with DVD chapter codec
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ed136d776df267588e9a939fec4bb69889f998d
---
modules/demux/mkv/chapter_command.hpp | 3 +++
modules/demux/mkv/mkv.cpp | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/modules/demux/mkv/chapter_command.hpp b/modules/demux/mkv/chapter_command.hpp
index 3969735..bce3835 100644
--- a/modules/demux/mkv/chapter_command.hpp
+++ b/modules/demux/mkv/chapter_command.hpp
@@ -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;
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index de9bcef..93ad241 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -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];
More information about the vlc-commits
mailing list