Commit 5a43bd5e authored by Anton Khirnov's avatar Anton Khirnov

options: simplify av_find_opt by using av_next_option.

parent 5b81e295
......@@ -33,10 +33,9 @@
//FIXME order them and do a bin search
const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mask, int flags)
{
AVClass *c= *(AVClass**)v; //FIXME silly way of storing AVClass
const AVOption *o= c->option;
const AVOption *o = NULL;
for (; o && o->name; o++) {
while ((o = av_next_option(v, o))) {
if (!strcmp(o->name, name) && (!unit || (o->unit && !strcmp(o->unit, unit))) && (o->flags & mask) == flags)
return o;
}
......
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