Revision 5a43bd5e

View differences:

libavutil/opt.c
33 33
//FIXME order them and do a bin search
34 34
const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mask, int flags)
35 35
{
36
    AVClass *c= *(AVClass**)v; //FIXME silly way of storing AVClass
37
    const AVOption *o= c->option;
36
    const AVOption *o = NULL;
38 37

  
39
    for (; o && o->name; o++) {
38
    while ((o = av_next_option(v, o))) {
40 39
        if (!strcmp(o->name, name) && (!unit || (o->unit && !strcmp(o->unit, unit))) && (o->flags & mask) == flags)
41 40
            return o;
42 41
    }

Also available in: Unified diff