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

Michael Niedermayer michaelni
Sun Aug 31 00:11:03 CEST 2008


On Wed, Aug 20, 2008 at 02:31:22AM +0200, Stefano Sabatini wrote:
> On date Saturday 2008-08-09 18:50:24 +0200, Michael Niedermayer encoded:
> > On Sat, Aug 09, 2008 at 04:12:29PM +0200, Stefano Sabatini wrote:
> > > Hi all,
> > > 
> > > I think this feature should go in lavc, also I think it shouldn't be
> > > enabled by default but let the user to explicitly set it.
> > 
> > rejected
> > the code could be put into a new function that applications can explixitly
> > call if they want ...
> 
> Do you mean like in the attached patch?

not exactly


> 
> Or do you mean to use the new function:
> avcodec_set_best_framerate(AVCodecContext *avctx, AVCodec *codec);
> 
> in avcodec_open(), so keeping the choose_best_framerate flag?

no


> 
> I still continue to prefer the solution which uses a flag in the codec
> context rather than in the application, which looks less cluttered.

This will mess up AV sync and many other things as the demuxer and
application may very well be unaware of this ...


I think we should add a function that takes a list of AVRational and a AVRational
and finds the closest match for that. Its return value should indicate if the
match is exact or approximate
Such function might be usefull for other things as well ...


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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- 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/20080831/6e43abe3/attachment.pgp>



More information about the ffmpeg-devel mailing list