[FFmpeg-devel] [PATCH] AVCHD/H.264 parser: determination of frame type, question about timestamps

Baptiste Coudurier baptiste.coudurier
Mon Jan 19 03:05:57 CET 2009

Michael Niedermayer wrote:
> On Sat, Jan 17, 2009 at 08:33:15PM +0100, Ivan Schreter wrote:
> [...]
>> As for the timestamps, there is a complicated algorithm guessing
>> timestamps for frames which are missing DTS/PTS timestamps in
>> libavformat/utils.c. IMHO this can be done much easier and more elegant
>> in compute_pkt_fields() in about this form:
>>     if (pkt->dts == AV_NOPTS_VALUE)
>>     {
>>         if(pkt->pts != AV_NOPTS_VALUE) {
>>             // set DTS same as PTS
>>             pkt->dts = pkt->pts;
> this case either doesnt exist or is wrong depending on how you see it.
> the demuxer sets both or neither.

Humm this might need checking, at least ts demuxer only sets pts
currently when only pts is available. Attached patch fixes this.

Doesn't Matroska set pts only too ?


Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ts_dts.patch
Type: text/x-diff
Size: 559 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090118/120fbb30/attachment.patch>

More information about the ffmpeg-devel mailing list