Commit 6b10c2e6 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf
Browse files

demux:mkv: do not preload the first Cluster

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
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 5af8fa8e
......@@ -628,21 +628,8 @@ bool matroska_segment_c::Preload( )
msg_Dbg( &sys.demuxer, "| + Cluster" );
if( !ParseCluster( kc_ptr ) )
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 ) );
/* stop pre-parsing the stream */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment