[FFmpeg-devel] [RFC][PATCH] ticks_per_frame / timebase

Michael Niedermayer michaelni
Thu Feb 26 20:04:39 CET 2009


On Thu, Feb 26, 2009 at 06:58:06PM +0100, Michael Niedermayer wrote:
> On Thu, Feb 26, 2009 at 06:48:07PM +0100, Ivan Schreter wrote:
> > Michael Niedermayer wrote:
> > > Attached is a patch that adds ticks_per_frame, which is a convertion factor
> > > between the timebase and the "framerate" as stored in the header.
> > > the patch also adapts several uses of timebase that where using it in the
> > > meaning of the framerate
> > > this patch is based on the one from ivan
> > >
> > > i will commit this in a few hours if i receive no objections or better
> > > suggestions. (short delay because of the release ...)
> > >   
> > Seems to work in general, but one small thing:
> > 
> > You forgot:
> > 
> > Index: libavformat/utils.c
> > ===================================================================
> > --- libavformat/utils.c (revision 17619)
> > +++ libavformat/utils.c (working copy)
> > @@ -1994,7 +1994,6 @@
> >  /*       || c->codec_tag == AV_RL32("DIVX")
> >         || c->codec_tag == AV_RL32("XVID")*/
> >         || c->codec_id == CODEC_ID_MPEG2VIDEO
> > -       || c->codec_id == CODEC_ID_H264
> >         )
> >          return 1;
> >      return 0;
> 
> no i didnt forget this, h264 is supposed to be on this list ...
> 
> 
> > 
> > Otherwise it's still going to estimate frame rate from field picture 
> > durations, resulting in 50fps for interlaced movies.
> 
> yes i did forget something ...

you seem to have forgetten a few things in your patch, for example
i suspect it generates random timestamps if the optional SEI mesages
are not pressent, it should generate AV_NOPTS_VALUE

also you maybe are missing a check for sps.timing_info_present_flag,
iam not sure if it makes sense to check it or what to do if its not
set ...


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- 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/20090226/d169f222/attachment.pgp>



More information about the ffmpeg-devel mailing list