[vlc-devel] [PATCH] demux: mp4: extract framerate from mp4 files with DASH encapsulation, using frame duration stored in elst 'i_media_time'

Francois Cartegnie fcvlcdev at free.fr
Tue Oct 6 17:47:19 CEST 2015


Le 06/10/2015 14:57, Emeric Grange a écrit :
> +        else // when encountering a track with 0 sample indexed (ex: DASH file) use i_media_time from elst to get frame duration
> +        {
> +            // handle elst (find the correct one)
> +            MP4_TrackSetELST( p_demux, p_track, 0 );
> +
> +            if( p_track->p_elst && p_track->BOXDATA(p_elst)->i_entry_count > 0 )
> +            {
> +                vlc_ureduce( pi_num, pi_den,
> +                             (uint64_t) BOXDATA(p_mdhd)->i_timescale,
> +                             (uint64_t) p_track->BOXDATA(p_elst)->i_media_time[p_track->i_elst],
> +                             UINT16_MAX );
> +            }

Edit lists of fragmented MP4 ? Who the hell does this ?

As long as you're not relying on samples count, that should be correct.

Francois



More information about the vlc-devel mailing list