[FFmpeg-devel] Is av_log_level supposed to be exported?

Diego Biurrun diego
Thu Dec 3 14:19:11 CET 2009


On Thu, Dec 03, 2009 at 02:04:31AM -0200, Ramiro Polla wrote:
> On Thu, Dec 3, 2009 at 1:47 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Dec 02, 2009 at 10:42:36PM -0200, Ramiro Polla wrote:
> >> av_log_level from libavutil/log.c is only used in that file. It is not
> >> declared in libavutil/log.h. It's meant to be used with the
> >> av_log_get_level() and av_log_set_level() functions.
> >>
> >> Should it be made static in log.c, or declared in libavutil/log.h so
> >> users can access it directly?
> >
> > should be made static in the next maj ver bump
> 
> 2 attempts attached, which one do you prefer?

> --- libavutil/log.c	(revision 20713)
> +++ libavutil/log.c	(working copy)
> @@ -27,6 +27,9 @@
>  
> +#if LIBAVUTIL_VERSION_MAJOR > 50
> +static
> +#endif
>  int av_log_level = AV_LOG_INFO;
>  
> --- libavutil/log.c	(revision 20713)
> +++ libavutil/log.c	(working copy)
> @@ -27,7 +27,11 @@
>  
> +#if LIBAVUTIL_VERSION_MAJOR > 50
> +static int av_log_level = AV_LOG_INFO;
> +#else
>  int av_log_level = AV_LOG_INFO;
> +#endif

Please use the second one, the first will inevitably lead to the
'static' keyword being left on a line of its own..

Diego



More information about the ffmpeg-devel mailing list