[vlc-devel] [PATCH 09/11] demux/mkv: Added error diagnostic if i_track does not match seekpoint

Filip Roséen filip at videolabs.io
Wed Mar 2 18:04:50 CET 2016


---
 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 e266ca4..cd6d264 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -991,6 +991,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();
-- 
2.7.2



More information about the vlc-devel mailing list