demux:mkv: don't overwrite a seekpoint using a lower trusted level
authorSteve Lhomme <robUx4@videolabs.io>
Fri, 4 Aug 2017 12:29:03 +0000 (14:29 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 6 Aug 2017 20:25:26 +0000 (22:25 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/matroska_segment_seeker.cpp

index c447ae3..2887e45 100644 (file)
@@ -119,6 +119,9 @@ SegmentSeeker::add_seekpoint( track_id_t track_id, Seekpoint sp )
 
     if( it != seekpoints.end() && it->pts == sp.pts )
     {
+        if (sp.trust_level <= it->trust_level)
+            return;
+
         *it = sp;
     }
     else