[vlc-devel] [PATCH 2/5] demux/mkv: do not give up if BlockGet fails

Filip Roséen filip at atch.se
Sat Oct 22 04:54:09 CEST 2016


We should not completely give up just because we cannot read the next
block, instead we simply break out of the loop, mark the range that we
could search as searched, and get on with our day.
---
 modules/demux/mkv/matroska_segment_seeker.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment_seeker.cpp b/modules/demux/mkv/matroska_segment_seeker.cpp
index dcab581..ac833e0 100644
--- a/modules/demux/mkv/matroska_segment_seeker.cpp
+++ b/modules/demux/mkv/matroska_segment_seeker.cpp
@@ -315,9 +315,7 @@ SegmentSeeker::index_unsearched_range( matroska_segment_c& ms, Range search_area
         matroska_segment_c::tracks_map_t::iterator i_track = ms.tracks.end();
 
         if( ms.BlockGet( block, simpleblock, &b_key_picture, &b_discardable_picture, &i_block_duration ) )
-        {
-            throw std::runtime_error( "Unable to BlockGet in SegmentSeeker::index_unsearched_range, EOF?" );
-        }
+            break;
 
         if( simpleblock ) {
             block_pos = simpleblock->GetElementPosition();
-- 
2.10.0



More information about the vlc-devel mailing list