[FFmpeg-devel] libavformat/utils.c/compute_pkt_fields2: calculate dts from pts

Dirk Musfeldt d.musfeldt
Wed Oct 10 12:56:08 CEST 2007

Michael Niedermayer schrieb am 09.10.2007 18:52 Uhr:

> On Tue, Oct 09, 2007 at 05:42:27PM +0100, M?ns Rullg?rd wrote:
>> Michael Niedermayer wrote:
>>> On Tue, Oct 09, 2007 at 04:21:12PM +0200, Dirk Musfeldt wrote:
>>>> As you may have read in the mail the frames indeed have valid timestamps.
>>>> It
>>>> is not required for a frame to have a dts value, at least it isn't in MPEG
>>>> streams.
>>> mpeg does require every frame which has a pts value also to have a dts value
>>> actually you cannot even store one for which this is not true the mpeg
>>> syntax
>>> doesnt support that
>> MPEG syntax and semantics allow packets with not timestamp, only PTS or
>> PTS and DTS.  If a packet has PTS but no DTS, DTS is implicitly equal to
>> PTS.  
> yes, did i say something which is wrong? i just meant that every packet
> which has a pts also does have a dts implicitly or not, that is
> theres no way to store pts=X dts=AV_NOPTS_VALUE as is

I was not aware that I had to explicitly set DTS if it is not explicitly set
in the MPEG PES packet I want to mux. I thought that setting DTS to
AV_NOPTS_VALUE was the right thing to do in this case.

I was aware that there is an implicit value in this case, though.

So thank you for the clarification M?ns and Michael.



More information about the ffmpeg-devel mailing list