[FFmpeg-devel] use AV_OPT_TYPE_BOOL in most places
Clément Bœsch
u at pkh.me
Sat Nov 21 22:17:49 CET 2015
For the record I used:
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 4fd25ff..d7a4ef0 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1005,6 +1005,13 @@ static void opt_list(void *obj, void *av_log_obj, const char *unit,
int i;
while ((opt = av_opt_next(obj, opt))) {
+
+ if (opt->type == AV_OPT_TYPE_INT &&
+ !opt->unit &&
+ (opt->min == -1 || opt->min == 0) &&
+ opt->max == 1)
+ fprintf(stderr, "opt \"%s\" is a potential bool\n", opt->name);
+
if (!(opt->flags & req_flags) || (opt->flags & rej_flags))
continue;
...and ffmpeg -h full to to detect them. It's likely I missed a few due to my
build options. Also, the lavc/ac3 options are left because of the constant
weirdness in use.
More information about the ffmpeg-devel
mailing list