av_get_number: also search children, this is more sane than not doing so.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7b382ab6b0
commit
bf71fb54b5
@ -262,7 +262,7 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c
|
|||||||
|
|
||||||
static int av_get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum)
|
static int av_get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum)
|
||||||
{
|
{
|
||||||
const AVOption *o = av_opt_find(obj, name, NULL, 0, 0);
|
const AVOption *o = av_opt_find(obj, name, NULL, 0, AV_OPT_SEARCH_CHILDREN);
|
||||||
void *dst;
|
void *dst;
|
||||||
if (!o || (o->offset<=0 && o->type != FF_OPT_TYPE_CONST))
|
if (!o || (o->offset<=0 && o->type != FF_OPT_TYPE_CONST))
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user