diff mbox series

[FFmpeg-devel] avutil/opt: Combine multiple av_log statements

Message ID DB6PR0101MB22146831AC2662F99C6FCBE18F9D9@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Accepted
Headers show
Series [FFmpeg-devel] avutil/opt: Combine multiple av_log statements | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 2, 2022, 5:28 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/opt.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

Comments

Thilo Borgmann Aug. 2, 2022, 6:15 p.m. UTC | #1
On 2 Aug 2022, at 19:28, Andreas Rheinhardt wrote:

> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavutil/opt.c | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/libavutil/opt.c b/libavutil/opt.c
> index 8ffb10449b..da3a65c041 100644
> --- a/libavutil/opt.c
> +++ b/libavutil/opt.c

LGTM

-Thilo
diff mbox series

Patch

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 8ffb10449b..da3a65c041 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1329,17 +1329,18 @@  FF_ENABLE_DEPRECATION_WARNINGS
                 av_log(av_log_obj, AV_LOG_INFO, "%-12s ", "");
                 break;
         }
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_ENCODING_PARAM) ? 'E' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_DECODING_PARAM) ? 'D' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_FILTERING_PARAM)? 'F' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_VIDEO_PARAM   ) ? 'V' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_AUDIO_PARAM   ) ? 'A' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_SUBTITLE_PARAM) ? 'S' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_EXPORT)         ? 'X' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_READONLY)       ? 'R' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_BSF_PARAM)      ? 'B' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_RUNTIME_PARAM)  ? 'T' : '.');
-        av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_DEPRECATED)     ? 'P' : '.');
+        av_log(av_log_obj, AV_LOG_INFO, "%c%c%c%c%c%c%c%c%c%c%c",
+               (opt->flags & AV_OPT_FLAG_ENCODING_PARAM) ? 'E' : '.',
+               (opt->flags & AV_OPT_FLAG_DECODING_PARAM) ? 'D' : '.',
+               (opt->flags & AV_OPT_FLAG_FILTERING_PARAM)? 'F' : '.',
+               (opt->flags & AV_OPT_FLAG_VIDEO_PARAM   ) ? 'V' : '.',
+               (opt->flags & AV_OPT_FLAG_AUDIO_PARAM   ) ? 'A' : '.',
+               (opt->flags & AV_OPT_FLAG_SUBTITLE_PARAM) ? 'S' : '.',
+               (opt->flags & AV_OPT_FLAG_EXPORT)         ? 'X' : '.',
+               (opt->flags & AV_OPT_FLAG_READONLY)       ? 'R' : '.',
+               (opt->flags & AV_OPT_FLAG_BSF_PARAM)      ? 'B' : '.',
+               (opt->flags & AV_OPT_FLAG_RUNTIME_PARAM)  ? 'T' : '.',
+               (opt->flags & AV_OPT_FLAG_DEPRECATED)     ? 'P' : '.');
 
         if (opt->help)
             av_log(av_log_obj, AV_LOG_INFO, " %s", opt->help);