Commit 48b287c8 authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

mkv: fixed SegmentSeeker::get_search_areas

Fixed bug where a too big of an area would be returned from the
function, instead of just the area that is really not searched
(indexed).

This will, of course, speed up seeking since we will not rescan an area
where we already know everything there is to know.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 799fb375
......@@ -366,9 +366,11 @@ SegmentSeeker::get_search_areas( fptr_t start, fptr_t end ) const
areas_to_search.push_back( Range( needle.start, it->start ) );
}
needle.start = it->end + 1;
if( needle.start <= it->end )
needle.start = it->end + 1;
}
needle.start = std::max( needle.start, start );
if( it == _ranges_searched.end() && needle.start < needle.end )
{
areas_to_search.push_back( needle );
......
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