You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
AVOptions: don't return an invalid option when option list is empty
This commit is contained in:
@@ -56,9 +56,10 @@ const AVOption *av_next_option(void *obj, const AVOption *last)
|
|||||||
|
|
||||||
const AVOption *av_opt_next(void *obj, const AVOption *last)
|
const AVOption *av_opt_next(void *obj, const AVOption *last)
|
||||||
{
|
{
|
||||||
if (last && last[1].name) return ++last;
|
AVClass *class = *(AVClass**)obj;
|
||||||
else if (last) return NULL;
|
if (!last && class->option[0].name) return class->option;
|
||||||
else return (*(AVClass**)obj)->option;
|
if (last && last[1].name) return ++last;
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int read_number(const AVOption *o, void *dst, double *num, int *den, int64_t *intnum)
|
static int read_number(const AVOption *o, void *dst, double *num, int *den, int64_t *intnum)
|
||||||
|
Reference in New Issue
Block a user