[vlc-devel] [PATCH] mux/avformat: normalize pts and dts in AVPacket

Francois Cartegnie fcvlcdev at free.fr
Tue Feb 21 14:17:10 CET 2017


Le 07/02/2017 à 13:15, Filip Roséen a écrit :

> These changes make sure that we start all timestamps at zero by
> normalizing each outgoing timestamp to the relative distance from the
> first entity received for each stream.

Seems wrong.

If stream is created late, it should be out of sync then, as the
absolute offset dissapears.

http://streams.videolan.org/samples/V-codecs/h264/hdtv-interlaced/stz_split_top_bottom_field.ts



> +    return ( timestamp - *base ) * p_stream->time_base.den /
> +           CLOCK_FREQ / p_stream->time_base.num;

Then what are the guarantees in the code that packet duration is still
correct on output ? PTS(n) - PTS(n-1) == LENGTH(n)


Francois



More information about the vlc-devel mailing list