Skip to content

Commit

Permalink
demux:mkv: keep the cue info even if the track is not known (yet)
Browse files Browse the repository at this point in the history
Fixes #19131

Signed-off-by: Jean-Baptiste Kempf <[email protected]>
  • Loading branch information
robUx4 authored and jbkempf committed Nov 28, 2017
1 parent fb643da commit ce8ea99
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions modules/demux/mkv/matroska_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce8ea99

Please sign in to comment.