[vlc-commits] demux: mkv: fix seek
Zhao Zhili
git at videolan.org
Mon Jul 2 11:37:45 CEST 2018
vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Fri Jun 29 16:37:18 2018 +0200| [7bbfee83ea31ab0d46bdd6f8a3d9dff7f5c227ef] | committer: Steve Lhomme
demux: mkv: fix seek
This fixes a regression from 6b10c2e6. Seek failed due to empty
_tracks_seekpoints[video_track].
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7bbfee83ea31ab0d46bdd6f8a3d9dff7f5c227ef
---
modules/demux/mkv/matroska_segment.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 0a7a588037..50b7c743d0 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -635,6 +635,16 @@ 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(), -1,
+ SegmentSeeker::Seekpoint::TrustLevel::QUESTIONABLE ) );
+ }
+
/* stop pre-parsing the stream */
break;
}
More information about the vlc-commits
mailing list