diff options
-rw-r--r-- | libavutil/opt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index bf63bef..aa76301 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -501,7 +501,8 @@ int av_opt_get_q(void *obj, const char *name, int search_flags, AVRational *out_ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name) { const AVOption *field = av_opt_find(obj, field_name, NULL, 0, 0); - const AVOption *flag = av_opt_find(obj, flag_name, NULL, 0, 0); + const AVOption *flag = av_opt_find(obj, flag_name, + field ? field->unit : NULL, 0, 0); int64_t res; if (!field || !flag || flag->type != AV_OPT_TYPE_CONST || |