diff --git a/libavutil/opt.c b/libavutil/opt.c index 8f2d9a69db..6b2bc7712d 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -45,7 +45,7 @@ const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mas const AVOption *av_next_option(void *obj, const AVOption *last) { if (last && last[1].name) return ++last; - else if (last) return NULL; + else if (last || !(*(AVClass**)obj)->option->name) return NULL; else return (*(AVClass**)obj)->option; }