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

Baptiste Coudurier baptiste.coudurier
Fri Jan 23 23:17:20 CET 2009

Michael Niedermayer wrote:
> On Sun, Jan 18, 2009 at 06:05:57PM -0800, Baptiste Coudurier wrote:
>> 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.
> iam not mpegts maintainer but i belive the patch is correct.

Well, applied, the patch is correct.

Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org

More information about the ffmpeg-devel mailing list