mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 21:20:41 +00:00
lavu/opt: check if class is NULL too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
39dc1bc90f
commit
f98dbc7311
@ -63,7 +63,7 @@ const AVOption *av_next_option(void *obj, const AVOption *last)
|
||||
const AVOption *av_opt_next(void *obj, const AVOption *last)
|
||||
{
|
||||
AVClass *class = *(AVClass**)obj;
|
||||
if (!last && class->option && class->option[0].name)
|
||||
if (!last && class && class->option && class->option[0].name)
|
||||
return class->option;
|
||||
if (last && last[1].name)
|
||||
return ++last;
|
||||
|
Loading…
Reference in New Issue
Block a user