[FFmpeg-devel] [PATCH] opt: print a deprecation indicator when listing options

Michael Niedermayer michael at niedermayer.cc
Sun May 6 03:22:22 EEST 2018


On Sat, May 05, 2018 at 09:45:26PM +0100, Rostislav Pehlivanov wrote:
> Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
> ---
>  libavutil/opt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavutil/opt.c b/libavutil/opt.c
> index 99282605f5..73295356a1 100644
> --- a/libavutil/opt.c
> +++ b/libavutil/opt.c
> @@ -1276,6 +1276,8 @@ static void opt_list(void *obj, void *av_log_obj, const char *unit,
>              }
>              av_log(av_log_obj, AV_LOG_INFO, ")");
>          }
> +        if (opt->flags & AV_OPT_FLAG_DEPRECATED)
> +            av_log(av_log_obj, AV_LOG_INFO, " (deprecated)");

Printing this together with the other flags as "%c" would reduce the
worst case width, leaving more space for the other fields

but maybe a bigger text as in this patch is better, i dont know

either way LGTM

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180506/b74018e5/attachment.sig>


More information about the ffmpeg-devel mailing list