[vlc-commits] demux:mkv: do not preload the clusters if we cannot seek

Steve Lhomme git at videolan.org
Wed Jan 3 11:17:47 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jan  2 16:38:14 2018 +0100| [61ea699c1b163d7075c23716dbcde5c2f64a22a3] | committer: Jean-Baptiste Kempf

demux:mkv: do not preload the clusters if we cannot seek

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61ea699c1b163d7075c23716dbcde5c2f64a22a3
---

 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() );



More information about the vlc-commits mailing list