提交 ea0d8938 编写于 作者: L Lukasz Marek

lavu/opt: handle NULL obj in av_opt_next

It indirectly also fixes av_opt_free for NULL objs.
Signed-off-by: NLukasz Marek <lukasz.m.luki2@gmail.com>
上级 2a89afb3
......@@ -50,7 +50,10 @@ const AVOption *av_next_option(void *obj, const AVOption *last)
const AVOption *av_opt_next(void *obj, const AVOption *last)
{
AVClass *class = *(AVClass**)obj;
const AVClass *class;
if (!obj)
return NULL;
class = *(const AVClass**)obj;
if (!last && class && class->option && class->option[0].name)
return class->option;
if (last && last[1].name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册