Commit 8a83c71c authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: don't trust only timescale for rate

wrong fix was 198bb199
parent d4ef9de7
......@@ -1918,8 +1918,10 @@ static void TrackGetESSampleRate( demux_t *p_demux,
MP4_Box_t *p_mdhd = MP4_BoxGet( p_trak, "mdia/mdhd" );
if ( p_mdhd )
{
*pi_num = BOXDATA(p_mdhd)->i_timescale / 1000;
*pi_den = 1;
vlc_ureduce( pi_num, pi_den,
BOXDATA(p_mdhd)->i_timescale * p_track->i_sample_count,
BOXDATA(p_mdhd)->i_duration,
UINT16_MAX);
return;
}
......
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