[FFmpeg-devel] [PATCH] Implement in lavc a flag which makes avcodec_open() to choose the best framerate

Stefano Sabatini stefano.sabatini-lala
Thu Sep 11 23:44:18 CEST 2008


On date Thursday 2008-09-11 05:52:01 +0200, Michael Niedermayer encoded:
> On Sun, Aug 31, 2008 at 08:58:53PM +0200, Stefano Sabatini wrote:
[...]
> > Index: libavutil/rational.h
> > ===================================================================
> > --- libavutil/rational.h	(revision 15120)
> > +++ libavutil/rational.h	(working copy)
> > @@ -113,4 +113,11 @@
> >   */
> >  AVRational av_d2q(double d, int max) av_const;
> >  
> > +/**
> > + * Finds the nearest value in \p q_list to \p q.
> > + * @param q_list an array of rationals terminated by {0, 0}
> > + * @return the nearest value found
> > + */
> > +AVRational av_find_nearest_q(AVRational q, AVRational* q_list);
> 
> maybe returning an index into the list would be more flexible.
> Its easy to convert a index to the AVRational not easy though
> the other way around.

Yes my only doubt is about the name:
is av_find_nearest_q_idx OK?

Regards.
-- 
FFmpeg = Friendly and Foolish Multimedia Prodigious Extreme Gem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implement-nearest-q-02.patch
Type: text/x-diff
Size: 4210 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080911/0b809f0c/attachment.patch>



More information about the ffmpeg-devel mailing list