Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r--libavutil/opt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 0666a60d66..2421ee8bf1 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -55,9 +55,10 @@ const AVOption *av_next_option(void *obj, const AVOption *last)
const AVOption *av_opt_next(void *obj, const AVOption *last)
{
- if (last && last[1].name) return ++last;
- else if (last || !(*(AVClass**)obj)->option->name) return NULL;
- else return (*(AVClass**)obj)->option;
+ AVClass *class = *(AVClass**)obj;
+ if (!last && class->option[0].name) return class->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)