Commit f2eff9cd authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

demux:mkv: do not find seek point when we don't have an end boundary

We'll just use the seekpoints we already have.

Fixes #17576

(cherry picked from commit cadcd7a9)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 924abe77
...@@ -290,17 +290,17 @@ SegmentSeeker::get_seekpoints( matroska_segment_c& ms, mtime_t target_pts, ...@@ -290,17 +290,17 @@ SegmentSeeker::get_seekpoints( matroska_segment_c& ms, mtime_t target_pts,
Seekpoint const& start = seekpoints.first; Seekpoint const& start = seekpoints.first;
Seekpoint const& end = seekpoints.second; Seekpoint const& end = seekpoints.second;
if (start.fpos == std::numeric_limits<fptr_t>::max() ) if ( start.fpos == std::numeric_limits<fptr_t>::max() )
return tracks_seekpoint_t(); return tracks_seekpoint_t();
if ( end.fpos != std::numeric_limits<fptr_t>::max() )
// do not read the whole (infinite?) file to get seek indexes
index_range( ms, Range( start.fpos, end.fpos ), needle_pts ); index_range( ms, Range( start.fpos, end.fpos ), needle_pts );
{
tracks_seekpoint_t tpoints = find_greatest_seekpoints_in_range( start.fpos, target_pts, filter_tracks ); tracks_seekpoint_t tpoints = find_greatest_seekpoints_in_range( start.fpos, target_pts, filter_tracks );
if( contains_all_of_t() ( tpoints, priority_tracks ) ) if( contains_all_of_t() ( tpoints, priority_tracks ) )
return tpoints; return tpoints;
}
needle_pts = start.pts - 1; needle_pts = start.pts - 1;
} }
......
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