[vlc-devel] [PATCH] demux: mkv: fix seek
Zhao Zhili
quinkblack at foxmail.com
Tue Jun 26 11:48:34 CEST 2018
This fixes a regression from 6b10c2e6. Seek failed due to empty
_tracks_seekpoints[video_track].
---
modules/demux/mkv/matroska_segment.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 148e66e..844558c 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -635,6 +635,15 @@ bool matroska_segment_c::Preload( )
cluster = kc_ptr;
+
+ // 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 */
break;
}
--
2.9.5
More information about the vlc-devel
mailing list