[vlc-commits] demux: mkv: if the seek position is already known, only update its trust level
Steve Lhomme
git at videolan.org
Mon Oct 5 08:39:26 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 2 12:46:48 2020 +0200| [dc8eb1399268069e0bfc451c25f4e45110ab389b] | committer: Steve Lhomme
demux: mkv: if the seek position is already known, only update its trust level
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc8eb1399268069e0bfc451c25f4e45110ab389b
---
modules/demux/mkv/matroska_segment_seeker.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mkv/matroska_segment_seeker.cpp b/modules/demux/mkv/matroska_segment_seeker.cpp
index 217f513887..d4b3d8e3a7 100644
--- a/modules/demux/mkv/matroska_segment_seeker.cpp
+++ b/modules/demux/mkv/matroska_segment_seeker.cpp
@@ -118,7 +118,14 @@ SegmentSeeker::add_seekpoint( track_id_t track_id, Seekpoint sp )
seekpoints_t& seekpoints = _tracks_seekpoints[ track_id ];
seekpoints_t::iterator it = std::lower_bound( seekpoints.begin(), seekpoints.end(), sp );
- if( it != seekpoints.end() && it->pts == sp.pts )
+ if( it != seekpoints.end() && it->fpos == sp.fpos )
+ {
+ if (sp.trust_level <= it->trust_level)
+ return;
+
+ *it = sp;
+ }
+ else if( it != seekpoints.end() && it->pts == sp.pts )
{
if (sp.trust_level <= it->trust_level)
return;
More information about the vlc-commits
mailing list