[FFmpeg-devel] [PATCH] let the packet throught if no timestamps

Baptiste Coudurier baptiste.coudurier
Tue Feb 3 04:04:44 CET 2009


Baptiste Coudurier wrote:
> Michael Niedermayer wrote:
>> On Mon, Feb 02, 2009 at 03:11:30PM -0800, Baptiste Coudurier wrote:
>>> Hi,
>>>
>>> $subject.
>> ok assuming you tested it (there could be code that breaks with no
>> dts at all)
> 
> Thanks for the good remark, I believe something like attached is better.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libavformat/utils.c
> ===================================================================
> --- libavformat/utils.c	(revision 16966)
> +++ libavformat/utils.c	(working copy)
> @@ -2614,6 +2614,9 @@ int ff_interleave_compare_dts(AVFormatContext *s,
>      int64_t left = st2->time_base.num * (int64_t)st ->time_base.den;
>      int64_t right= st ->time_base.num * (int64_t)st2->time_base.den;
>  
> +    if (pkt->dts == AV_NOPTS_VALUE)
> +        return 1;
> +
>      return next->dts * left > pkt->dts * right; //FIXME this can overflow
>  }

Sorry, I think it should it be return 0. I'm tired :/

-- 
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