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

Soft Works softworkz at hotmail.com
Sat Aug 7 02:55:00 EEST 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> James Almer
> Sent: Saturday, 7 August 2021 00:17
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v2] fftools/cmdutils: don't print build
> configuration by default
> 
> On 8/6/2021 7:08 PM, Soft Works wrote:
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> >> James Almer
> >> Sent: Friday, 6 August 2021 23:49
> >> To: ffmpeg-devel at ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH v2] fftools/cmdutils: don't print
> >> build configuration by default
> >>
> >> On 8/6/2021 6:38 PM, Soft Works wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf
> Of
> >>>> James Almer
> >>>> Sent: Friday, 6 August 2021 23:17
> >>>> To: ffmpeg-devel at ffmpeg.org
> >>>> Subject: [FFmpeg-devel] [PATCH v2] fftools/cmdutils: don't print
> >>>> build configuration by default
> >>>>
> >>>> Suggested-by: ffmpeg at fb.com
> >>>> Signed-off-by: James Almer <jamrial at gmail.com>
> >>>> ---
> >>>>    fftools/cmdutils.c | 4 +++-
> >>>>    1 file changed, 3 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index
> >>>> 912e881174..e6ae749167 100644
> >>>> --- a/fftools/cmdutils.c
> >>>> +++ b/fftools/cmdutils.c
> >>>> @@ -1152,6 +1152,8 @@ static void print_all_libs_info(int flags,
> >>>> int
> >>>> level) static void print_program_info(int flags, int level)  {
> >>>>        const char *indent = flags & INDENT? "  " : "";
> >>>> +    // Show config only if level is verbose or higher
> >>>> +    int config_level = level <= AV_LOG_INFO ? AV_LOG_VERBOSE :
> >>>> + level;
> >>>
> >>> I don't think it will work this way because level is hardcoded to
> >>> AV_LOG_INFO in both upstream calls.
> >>
> >> I can hardcode it to VERBOSE if that's preferred. I made it this way
> >> since there could be new callers in the future that could choose a
> different level.
> >> Otherwise we could just remove the level parameter altogether.
> >
> > Yes, that would make it more clear. But another parameter is needed,
> > because when it's called from show_version, it should always be
> > printed, regardless of loglevel.
> 
> Does "ffmpeg -version" not show it for you with this patch? It does for me.

Yes it does. Sorry, I have a few other modifications which required 
a different approach (years ago).

LGTM. 
(tested against the master branch now)

softworkz


More information about the ffmpeg-devel mailing list