[vlc-devel] [PATCH 11/11] demux:mkv: do not preload the first Cluster

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


We stop preload the Matroska head when encountering the first Cluster ID+Length
and we keep it for when we start reading (unless we seek to a different position
on startup).

Fix #19177
---
 modules/demux/mkv/matroska_segment.cpp | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index dad3d70d63..e6361a1953 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -628,21 +628,8 @@ bool matroska_segment_c::Preload( )
             }
             msg_Dbg( &sys.demuxer, "|   + Cluster" );
 
-            if( !ParseCluster( kc_ptr ) )
-                break;
 
             cluster = kc_ptr;
-            IndexAppendCluster( cluster );
-
-            // add first cluster as trusted seekpoint for all tracks
-            for( tracks_map_t::const_iterator it = tracks.begin();
-                 it != tracks.end(); ++it )
-            {
-                _seeker.add_seekpoint( it->first,
-                    SegmentSeeker::Seekpoint( cluster->GetElementPosition(), 0 ) );
-            }
-
-            ep->Down();
             /* stop pre-parsing the stream */
             break;
         }
-- 
2.14.2



More information about the vlc-devel mailing list