Commit 7d32c880 authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf
Browse files

mkv: Added error diagnostic if i_track does not match seekpoint



Added an if-check to make sure that we do not crash on the lines that
follow if we, for some reason, end up in a state where there is no
matching seekpoint for the specified `i_track`.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent fce2945e
......@@ -996,6 +996,11 @@ void matroska_segment_c::Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int6
if (it->i_track == i_track)
break;
if (unlikely (it == spoints.end ()) ) {
msg_Err( &sys.demuxer, "Unable to locate seekpoint using i_track = %zu!", i_track);
return;
}
it->i_mk_date = i_mk_pts;
if( simpleblock )
it->i_seek_pos = simpleblock->GetElementPosition();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment