Просмотр исходного кода

avopt: Fix searching for constants
Fixes Ticket350

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer 13 лет назад
Родитель
Сommit
0962ad0e2f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      libavutil/opt.c

+ 1 - 1
libavutil/opt.c

@@ -575,7 +575,7 @@ const AVOption *av_opt_find(void *obj, const char *name, const char *unit,
     while (o = av_next_option(obj, o)) {
         if (!strcmp(o->name, name) && (o->flags & opt_flags) == opt_flags &&
             ((!unit && o->type != FF_OPT_TYPE_CONST) ||
-             (unit  && o->unit && !strcmp(o->unit, unit))))
+             (unit  && o->type == FF_OPT_TYPE_CONST && o->unit && !strcmp(o->unit, unit))))
             return o;
     }
     return NULL;