demux/mkv: do not give up if BlockGet fails
authorFilip Roséen <filip@atch.se>
Sat, 22 Oct 2016 02:54:09 +0000 (04:54 +0200)
committerThomas Guillem <thomas@gllm.fr>
Wed, 26 Oct 2016 14:30:02 +0000 (16:30 +0200)
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.

Signed-off-by: Steve Lhomme <robux4@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/demux/mkv/matroska_segment_seeker.cpp

index dcab581..ac833e0 100644 (file)
@@ -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();