[vlc-devel] [PATCH 07/11] demux:mkv: do not preload the clusters if we cannot seek

Steve Lhomme robux4 at ycbcr.xyz
Tue Jan 2 16:38:14 CET 2018


---
 modules/demux/mkv/matroska_segment.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 681a166936..dad3d70d63 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -620,7 +620,8 @@ bool matroska_segment_c::Preload( )
         }
         else if( MKV_CHECKED_PTR_DECL ( kc_ptr, KaxCluster, el ) )
         {
-            if( var_InheritBool( &sys.demuxer, "mkv-preload-clusters" ) )
+            if( sys.b_seekable &&
+                var_InheritBool( &sys.demuxer, "mkv-preload-clusters" ) )
             {
                 PreloadClusters        ( kc_ptr->GetElementPosition() );
                 es.I_O().setFilePointer( kc_ptr->GetElementPosition() );
-- 
2.14.2



More information about the vlc-devel mailing list