[Ffmpeg-devel] [PATCH] fix av_log_set_level undefined

Michael Niedermayer michaelni
Wed Feb 7 12:56:50 CET 2007


Hi

On Wed, Feb 07, 2007 at 12:42:58PM +0100, Baptiste Coudurier wrote:
> Hi
> 
> Michael Niedermayer wrote:
> > Hi
> > 
> > On Wed, Feb 07, 2007 at 06:11:40PM +0800, Limin Wang wrote:
> >> Hi,
> >>
> >> * Luca Abeni <lucabe72 at email.it> [2007-02-07 10:55:50 +0100]:
> >>
> >>> Hi Guillaume,
> >>>
> >>> On Wed, 2007-02-07 at 10:32 +0100, Guillaume POIRIER wrote:
> >>> [...]
> >>>>> I think av_log_get/set_level is useful function and
> >>>>> shouldn't depend on LIBAVUTIL_VERSION_INT version.
> >>>>> The attached patch try to fix compile failed after
> >>>>> LIBAVUTIL_VERSION_INT increased.
> >>>> I confirm that this patch fixes compilation failure.
> >>>>
> >>>> Is it good to go Michael?
> > 
> > no rejected
> > 
> > 
> >>> I am not Michael, but I seem to remember the discussion that originated
> >>> the removal of av_log_{get,set}_level().
> >>> I think Michael wanted to remove such functions by exporting
> >>> av_log_level and directly accessing it.
> >>>
> >>> If my understanding is correct, the attached patch might be a better
> >>> solution.
> > 
> > yes looks ok
> > 
> > 
> >> I prefer to using av_log_{get,set}_level() instead of using global variable.
> > 
> > but besides that you prefer it, do you have any technical arguments for it?
> > 
> 
> Possibility of checking incorrect values when using set maybe ?

that argument can be applied to every variable in every context, do you
propose to add 5000 set/get functions?
also we didnt had any problems with people setting incorrect values for 
av_log_level and neither is there much of a problem with that, setting
it to INT_MAX or INT_MIN will do what is expected ...

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

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- 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/20070207/8118eefd/attachment.pgp>



More information about the ffmpeg-devel mailing list