av_get_number: also search children, this is more sane than not doing so.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Aug 2011 22:49:04 +0000 (00:49 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Aug 2011 23:06:15 +0000 (01:06 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/opt.c

index 609167e..97ec071 100644 (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;