[FFmpeg-devel] [PATCH] fix start time with delay

Baptiste Coudurier baptiste.coudurier
Fri Nov 26 00:20:35 CET 2010


On 11/25/10 3:16 PM, Michael Niedermayer wrote:
> On Wed, Nov 24, 2010 at 06:29:29PM -0800, Baptiste Coudurier wrote:
>> Hi guys,
>>
>> $subject.
>>
>> This happens if the first I frame is delayed and the following frames
>> are decodable and reordered.
>>
>> -- 
>> Baptiste COUDURIER
>> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
>> FFmpeg maintainer                                  http://www.ffmpeg.org
> 
>>  utils.c |    2 ++
>>  1 file changed, 2 insertions(+)
>> 8ea30827f607b6af0ffafaa87a573895ef8b18d8  fix_start_time_with_delay.patch
>> Index: libavformat/utils.c
>> ===================================================================
>> --- libavformat/utils.c	(revision 25824)
>> +++ libavformat/utils.c	(working copy)
>> @@ -1045,6 +1045,8 @@
>>          if(st->codec->codec_id == CODEC_ID_H264){ //we skiped it above so we try here
>>              update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts); // this should happen on the first packet
>>          }
>> +        if (pkt->pts < st->start_time)
>> +            st->start_time = pkt->pts;
> 
> This breaks with timestamp discontinuities as well as with timestamp wrap
> around

What do you suggest ?

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list