Commit ea0d8938 authored by Lukasz Marek's avatar Lukasz Marek

lavu/opt: handle NULL obj in av_opt_next

It indirectly also fixes av_opt_free for NULL objs.
Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki2@gmail.com>
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment