[FFmpeg-devel] [PATCH] fftools: notify user of flags upon loglevel parse failure
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Fri Feb 21 13:04:42 EET 2025
Gyan Doshi:
>
>
> On 2025-02-21 02:21 pm, Andreas Rheinhardt wrote:
>> Gyan Doshi:
>>> ---
>>> fftools/opt_common.c | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/fftools/opt_common.c b/fftools/opt_common.c
>>> index 317e8458c1..2ac3fd4fb3 100644
>>> --- a/fftools/opt_common.c
>>> +++ b/fftools/opt_common.c
>>> @@ -1330,6 +1330,11 @@ int opt_loglevel(void *optctx, const char
>>> *opt, const char *arg)
>>> "Possible levels are numbers or:\n", arg);
>>> for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++)
>>> av_log(NULL, AV_LOG_FATAL, "\"%s\"\n",
>>> log_levels[i].name);
>>> + av_log(NULL, AV_LOG_FATAL, "Possible flags are:\n");
>>> + av_log(NULL, AV_LOG_FATAL, "\"repeat\"\n");
>>> + av_log(NULL, AV_LOG_FATAL, "\"level\"\n");
>>> + av_log(NULL, AV_LOG_FATAL, "\"time\"\n");
>>> + av_log(NULL, AV_LOG_FATAL, "\"datetime\"\n");
>>> return AVERROR(EINVAL);
>>> }
>>>
>> This would all fit into one line.
>
> Do you mean a single log call, or also printed on one line?
> If the former, the remaining values will be misaligned with the first one.
> If the latter, it's prettier with one value per line, just like the log
> level values printed just above.
I meant the latter. And I actually prefer the more compact form
"repeat", "level", "time", "datetime" to the one-value-per-line form.
- Andreas
More information about the ffmpeg-devel
mailing list