[Ffmpeg-devel] [PATCH] fix -ab default

Michael Niedermayer michaelni
Wed Mar 7 01:13:03 CET 2007


Hi

On Wed, Mar 07, 2007 at 12:36:01AM +0100, Baptiste Coudurier wrote:
> Hi
> 
> Michael Niedermayer wrote:
> > Hi
> > 
> > attached patch adds a new avcodec_get_context_defaults2() and 
> > avcodec_alloc_context2() which take an additional CodecType as argument
> > 
> > it adds a av_opt_set_defaults2() which has a flags parameter so only
> > specific defaults are used
> > 
> > and it adds a -ab to AVOption whos flags specify that it only applies for
> > audio and -b only applies to video
> > 
> > and last it makes ffmpeg.c use the new code
> > 
> > all that together fixes the -ab default (note the recent changes to
> > command line option handling did not truly introduce this bug it was
> > rather hidden by the old code ...)
> > 
> > so everyone who flamed please now read and comment! that is
> > comment now not after i applied it!
> > 
> > is CodecType a good choice as argument for the default setting function?
> > i choose it as it was slightly easier, alternatives are AVCodec and
> > CodecID, the advantage of the later 2 would be that we would move
> > toward being able to have per codec defaults which could come in handy
> > for x264
> 
> Well, since we cannot afford to change API oftenly, would it be hard to
> use CodecID now ? Im sure some people would be happy to start tweaking
> x264 default settings.

well after thinking and RTFSing a little it doesnt seems that using CodecID
belongs into this patch its a seperate issue and requires a few additional
changes, ill add a comment to 
avcodec_get_context_defaults2 / avcodec_alloc_context2 that they are not part
of the public API, so theres no API breakage when someone adds
CodecID support

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

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- 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/20070307/47640ff8/attachment.pgp>



More information about the ffmpeg-devel mailing list