Commit 0962ad0e authored by Michael Niedermayer's avatar Michael Niedermayer

avopt: Fix searching for constants

Fixes Ticket350
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bd358e12
...@@ -575,7 +575,7 @@ const AVOption *av_opt_find(void *obj, const char *name, const char *unit, ...@@ -575,7 +575,7 @@ const AVOption *av_opt_find(void *obj, const char *name, const char *unit,
while (o = av_next_option(obj, o)) { while (o = av_next_option(obj, o)) {
if (!strcmp(o->name, name) && (o->flags & opt_flags) == opt_flags && if (!strcmp(o->name, name) && (o->flags & opt_flags) == opt_flags &&
((!unit && o->type != FF_OPT_TYPE_CONST) || ((!unit && o->type != FF_OPT_TYPE_CONST) ||
(unit && o->unit && !strcmp(o->unit, unit)))) (unit && o->type == FF_OPT_TYPE_CONST && o->unit && !strcmp(o->unit, unit))))
return o; return o;
} }
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment