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

Måns Rullgård mans
Tue Oct 9 19:02:39 CEST 2007


Michael Niedermayer wrote:
> 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 no 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

Quite right.  I was merely clarifying what I assumed you meant, in case
it wasn't obvious to others.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list