Commit ce1a2fbb authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: segfault regression (fix #17603)

parent af913e08
......@@ -1207,7 +1207,7 @@ static int Demux( demux_t *p_demux )
for( i_track = 0; i_track < p_sys->i_tracks; i_track++ )
{
mp4_track_t *tk = &p_sys->track[i_track];
if( !tk->b_ok || tk->b_chapters_source || tk->i_sample_count == 0 )
if( !tk->b_ok || tk->b_chapters_source || tk->i_sample >= tk->i_sample_count )
continue;
/* Test for EOF on each track (samples count, edit list) */
b_eof &= ( i_nztime > MP4_TrackGetDTS( p_demux, tk ) );
......
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