vlc | branch: master | Filip Roséen <[email protected]> | Fri Mar 4 17:04:16 2016 +0100| [7d32c880d5f8960942d2b97ff555031fdbc7e72d] | committer: Jean-Baptiste Kempf
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 <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d32c880d5f8960942d2b97ff555031fdbc7e72d --- modules/demux/mkv/matroska_segment.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp index 5d7e3a8..c64fdbf 100644 --- a/modules/demux/mkv/matroska_segment.cpp +++ b/modules/demux/mkv/matroska_segment.cpp @@ -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(); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
