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

Francois Cartegnie fcvlcdev at free.fr
Tue Feb 21 14:46:40 CET 2017

Le 21/02/2017 à 14:35, Filip Roséen a écrit :
>> 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
> The incoming timestamps (as seen by the *muxer*) are not guaranteed to
> start at any particular offset, which further means that there is no
> way to know whether a "stream is created late".
> All the *muxer* sees is a timestamp, and it will use that as the
> starting offset for whatever it is muxing. The changes incorporated in
> the proposed patch does not change any behavior in terms of
> discontinuity, nor *"late starts"*.

It -does- change, and everything is out of sync.

[00007f519c003228] avformat mux error: could not write frame (pts:
12237718190, dts: 12237684823) (pkt pts: 22772, dts: 22806)
[matroska @ 0x7f519c005c40] pts 22856 < dts 22922 in stream 2
[00007f519c003228] avformat mux error: could not write frame (pts:
12237801612, dts: 12237801612) (pkt pts: 22856, dts: 22922)
[matroska @ 0x7f519c005c40] pts 22872 < dts 22939 in stream 2
[00007f519c003228] avformat mux error: could not write frame (pts:

More information about the vlc-devel mailing list