[vlc-commits] demux:mkv: keep the cue info even if the track is not known (yet)

Steve Lhomme git at videolan.org
Tue Nov 28 16:01:01 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Nov 28 15:31:18 2017 +0100| [ce8ea99131e2bb343bdae844b777acf499b1ea0f] | committer: Jean-Baptiste Kempf

demux:mkv: keep the cue info even if the track is not known (yet)

Fixes #19131

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce8ea99131e2bb343bdae844b777acf499b1ea0f
---

 modules/demux/mkv/matroska_segment.cpp | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index bca4f68571..bd2fd7e7be 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -208,20 +208,15 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
 
             if( track_id != 0 && cue_mk_time != -1 && cue_position != static_cast<uint64_t>( -1 ) ) {
 
-                if( tracks.find( track_id ) != tracks.end() )
-                {
-                    SegmentSeeker::Seekpoint::TrustLevel level = SegmentSeeker::Seekpoint::DISABLED;
-
-                    if( ! b_invalid_cue )
-                    {
-                        level = SegmentSeeker::Seekpoint::QUESTIONABLE; // TODO: var_InheritBool( ..., "mkv-trust-cues" );
-                    }
+                SegmentSeeker::Seekpoint::TrustLevel level = SegmentSeeker::Seekpoint::DISABLED;
 
-                    _seeker.add_seekpoint( track_id,
-                        SegmentSeeker::Seekpoint( cue_position, cue_mk_time, level ) );
+                if( ! b_invalid_cue && tracks.find( track_id ) != tracks.end() )
+                {
+                    level = SegmentSeeker::Seekpoint::QUESTIONABLE; // TODO: var_InheritBool( ..., "mkv-trust-cues" );
                 }
-                else
-                    msg_Warn( &sys.demuxer, "Found cue with invalid track id = %u", track_id );
+
+                _seeker.add_seekpoint( track_id,
+                    SegmentSeeker::Seekpoint( cue_position, cue_mk_time, level ) );
             }
         }
         else



More information about the vlc-commits mailing list