[vlc-devel] [vlc-commits] packetizer: h264: set duration also using frame rate

Francois Cartegnie fcvlcdev at free.fr
Wed Mar 22 15:13:39 CET 2017


Le 22/03/2017 à 14:32, Filip Roséen a écrit :

>> +    if( p_pic->i_length == 0 )
>> +    {
>> +        if( p_sps->vui.i_time_scale )
>> +        {
>> +            p_pic->i_length = CLOCK_FREQ * i_num_clock_ts *
>> +                              p_sps->vui.i_num_units_in_tick / p_sps->vui.i_time_scale;
> 
> I cannot see how the above is valid if `p_sps->vui.b_fixed_frame_rate
> == 0`, as such I propose the attached patch as a fixup. I would
> however be happy to stand corrected as learning something new is
> always welcomed.

b_fixed_frame_rate and time_scale presences are not exclusive.

i_num_clock_ts is timing and is valid, fixed rate or not.
The only issue here is time_scale not matching demuxer's values/dts.

Francois



More information about the vlc-devel mailing list