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

Michael Niedermayer michaelni
Fri Nov 26 00:16:36 CET 2010


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101126/8d3ec920/attachment.pgp>



More information about the ffmpeg-devel mailing list