[FFmpeg-devel] [PATCH] fftools/cmdutils: don't print build configuration by default

Soft Works softworkz at hotmail.com
Fri Aug 6 23:44:21 EEST 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> James Almer
> Sent: Friday, 6 August 2021 20:27
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] fftools/cmdutils: don't print build
> configuration by default
> 
> On 8/6/2021 3:08 PM, Andreas Rheinhardt wrote:
> > James Almer:
> >> From: Matthieu Patou <mpatou at fb.com>
> >>
> >> Suggested-by: ffmpeg at fb.com
> >> Signed-off-by: James Almer <jamrial at gmail.com>
> >> ---
> >>   fftools/cmdutils.c | 5 +++--
> >>   1 file changed, 3 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index
> >> 912e881174..fc58277df7 100644
> >> --- a/fftools/cmdutils.c
> >> +++ b/fftools/cmdutils.c
> >> @@ -1160,7 +1160,8 @@ static void print_program_info(int flags, int
> level)
> >>       av_log(NULL, level, "\n");
> >>       av_log(NULL, level, "%sbuilt with %s\n", indent, CC_IDENT);
> >>
> >> -    av_log(NULL, level, "%sconfiguration: " FFMPEG_CONFIGURATION
> "\n", indent);
> >> +    if (flags & SHOW_CONFIG)
> >> +        av_log(NULL, level, "%sconfiguration: " FFMPEG_CONFIGURATION
> >> + "\n", indent);
> >>   }
> >>
> >>   static void print_buildconf(int flags, int level) @@ -1203,7
> >> +1204,7 @@ void show_banner(int argc, char **argv, const OptionDef
> *options)
> >>   int show_version(void *optctx, const char *opt, const char *arg)
> >>   {
> >>       av_log_set_callback(log_callback_help);
> >> -    print_program_info (SHOW_COPYRIGHT, AV_LOG_INFO);
> >> +    print_program_info (SHOW_COPYRIGHT|SHOW_CONFIG,
> AV_LOG_INFO);
> >>       print_all_libs_info(SHOW_VERSION, AV_LOG_INFO);
> >>
> >>       return 0;
> >>
> > This ensures that the configuration will be missing from most bugreports.
> 
> Yes, that was my main concern as well. But ffmpeg -version will still show the
> build configuration, in any case.

In my fork, I have a similar change, but I'm also printing the build config when
loglevel >= VERBOSE. This largely addresses the bugreport concern as for those
cases it will usually require a higher loglevel than INFO anyway.

softworkz



More information about the ffmpeg-devel mailing list