Re: [FFmpeg-devel] [PATCH] opt: print a deprecation indicator when listing options
On Sat, May 05, 2018 at 09:45:26PM +0100, Rostislav Pehlivanov wrote: > Signed-off-by: Rostislav Pehlivanov> --- > 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)"); > does this fit well with the help message that is supposed to be updated to say what to use instead of that deprecated field? -- Clément B. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] opt: print a deprecation indicator when listing options
On Sat, May 05, 2018 at 09:45:26PM +0100, Rostislav Pehlivanov wrote: > Signed-off-by: Rostislav Pehlivanov> --- > 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 signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] opt: print a deprecation indicator when listing options
Signed-off-by: Rostislav Pehlivanov--- 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)"); av_log(av_log_obj, AV_LOG_INFO, "\n"); if (opt->unit && opt->type != AV_OPT_TYPE_CONST) -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel