[FFmpeg-devel] [patch 3/3] Make timing calculations less dependant on start_time being defined.

Michael Niedermayer michaelni
Wed Aug 29 18:55:02 CEST 2007


Hi

On Wed, Aug 29, 2007 at 04:42:51PM +0200, Benoit Fouet wrote:
> Benoit Fouet wrote:
> > Michael Niedermayer wrote:
> >   
> >> Hi
> >>
> >> On Sat, Aug 25, 2007 at 08:45:50AM +1000, Neil Brown wrote:
> >>   
> >>     
> >>> On Friday August 24, michaelni at gmx.at wrote:
> >>>     
> >>>       
> >>>>> I'm having a hard time understanding the point of some of (well... all
> >>>>> of) the code in update_initial_timestamps.
> >>>>>         
> >>>>>           
> >>>> its very simple, av_find_stream_info() analyses a input file/stream and
> >>>> buffers all packets which it had to read (so that theres no need to seek
> >>>> back after av_find_stream_info() which with pipes would be impossible)
> >>>>
> >>>> update_initial_timestamps() updates the timestamps of these buffered
> >>>> packets in the case that the packets had no timestamp (that is libavformat
> >>>> used the framerate / AVPacket.duration to set timestamps starting from a
> >>>> arbitrary (=0) timestamt)
> >>>>       
> >>>>         
> >>> Ahhhh... I get it now.  All the time stamps are being offset by
> >>>    dts - st->cur_dts
> >>>
> >>> That makes sense.  Thanks.
> >>>
> >>>     
> >>>       
> >>>> the first packet with a timestamp gets put in the buffer after 
> >>>> update_initial_timestamps() is called thus if theres nothing in the buffer
> >>>> the code to set start_time fails ...
> >>>> solution seems to be to pass pkt->pts in addition to dts into
> >>>> update_initial_timestamps() and then add an additional check to use that
> >>>> if no packet in the buffer had a pts value
> >>>>       
> >>>>         
> >>> So this patch maybe (which also appears to fix my problem).
> >>>     
> >>>       
> >> patch looks ok
> >>
> >> [...]
> >>   
> >>     
> >
> > Neil, please attach your patches to your mails and generate your diffs
> > so that the patches can be applied with patch -p0 or -p1, thanks.
> >
> > also, libav tests reference file needs an update...
> > see attached patch
> >
> >   
> 
> ping ?
> is the regression reference file's diff ok ?

what do the seek regression tests say?
rm tests/seek_test ; make seektest or something like that

[...]

-- 
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: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070829/714d350e/attachment.pgp>



More information about the ffmpeg-devel mailing list