[Ffmpeg-devel] Bug in pts computation in compute_pkt_fields() ?

Michael Niedermayer michaelni
Sat Mar 24 19:20:30 CET 2007


Hi

On Sat, Mar 24, 2007 at 01:03:22PM -0000, Wolfram Gloger wrote:
> > > cur_dts must never become negative..
> > 
> > why?
> 
> Well, e.g. because truncate_ts fails for negative dts:
> 
> static void truncate_ts(AVStream *st, AVPacket *pkt){
>     int64_t pts_mask = (2LL << (st->pts_wrap_bits-1)) - 1;
> 
>     //if(pkt->dts < 0)
>     //    pkt->dts= 0;  //this happens for low_delay=0 and b frames, FIXME, needs further invstigation about what we should do here
> 
>     if (pkt->pts != AV_NOPTS_VALUE)
>         pkt->pts &= pts_mask;
>     if (pkt->dts != AV_NOPTS_VALUE)
>         pkt->dts &= pts_mask;
> }
> 
> So, if negative dts is allowed, at least the two lines above need to
> be uncommented, no?  Or some better solution must be found.

no, i see no problem here


> 
> Background: I'm now seeing errors even in "make test" for the mpeg-ts
> muxer; some packets' dts becomes negative due to the new code in

make test passed last time i tried (which was today) 

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

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070324/2802dd19/attachment.pgp>



More information about the ffmpeg-devel mailing list