Commit 6dfb3130 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: mp4: never match an empty fragment on seek

Moov fragment has full length after fixup, but zero data.
Fixes 0 position on ismv seek
parent afa9344c
......@@ -4280,6 +4280,12 @@ static mp4_fragment_t * GetFragmentByTime( demux_t *p_demux, const mtime_t i_tim
mtime_t i_base_time = 0;
while ( p_fragment )
{
if ( p_fragment == &p_demux->p_sys->moovfragment &&
p_fragment->i_chunk_range_max_offset == 0 )
{
p_fragment = p_fragment->p_next;
continue;
}
mtime_t i_length = CLOCK_FREQ * p_fragment->i_duration / p_demux->p_sys->i_timescale;
if ( i_time >= i_base_time &&
i_time <= i_base_time + i_length )
......
Supports Markdown
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