[Ffmpeg-devel] [PATCH] fix av_log_set_level undefined

Limin Wang lance.lmwang
Thu Feb 8 03:06:24 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Michael Niedermayer <michaelni at gmx.at> [2007-02-07 12:56:50 +0100]:

> 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?

If in the future, we don't want the argument applied to every context, then
it'll difficult to do that. However if we use av_log_{get,set}_level, then
it'll hide it, we can add the applied context for it only. Yes, this may never
happened for av_log_level.


> 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 ...



Thanks,
Limin

> 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Those who are too smart to engage in politics are punished by being
> governed by those who are dumber. -- Plato 



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRcqFoEztbf7dKiuoAQKmIwgAkMViMvlyLTlGYAxGQa3Rlyu3QhOFqLj+
Ghr1qQUz3Fdw86fK3SmPSZVUO/hDy8GwzrLTRy7XZnJxuRDJ9o31m0vxD6KKElAK
RND1fv4WyI+NCJPvzNFUWFRpC66d1nt5P29BLbQ1a2mhKER8xf1g/TCObSb6waJe
f/ocVdpWnTnw930Tj0yDHzLaQvMw90zOfaTH9XfrQUCgJJOK0ZIMKHVGAfloeQgW
L64etv1e236yZHc0ZmBWKNyoDc3jpczFQn7QcOsjwQCEKFRGwiqunSsa5a1Bak3k
0rI4/ZWX/0FU6Ea4R8lrYz+hPlqTu7R6qip2zk89UMcdv2p1N2/YgQ==
=yrML
-----END PGP SIGNATURE-----




More information about the ffmpeg-devel mailing list