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:
Michael Niedermayer 2011-08-13 00:49:04 +02:00
parent 7b382ab6b0
commit bf71fb54b5

View File

@ -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)
{
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;
if (!o || (o->offset<=0 && o->type != FF_OPT_TYPE_CONST))
goto error;