From 8833f1508b7b6afc3172a8017934a7a54428c686 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Thu, 27 Nov 2014 00:11:01 +0100 Subject: opt: Add const to av_opt_next MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also add const to pointers in static functions within opt.c where possible/necessary. Signed-off-by: Martin Storsjö --- libavutil/opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavutil/opt.c') diff --git a/libavutil/opt.c b/libavutil/opt.c index f2e3e6d333..c5a1933aa3 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -34,7 +34,7 @@ #include "log.h" #include "mathematics.h" -const AVOption *av_opt_next(void *obj, const AVOption *last) +const AVOption *av_opt_next(const void *obj, const AVOption *last) { AVClass *class = *(AVClass**)obj; if (!last && class->option && class->option[0].name) @@ -44,7 +44,7 @@ const AVOption *av_opt_next(void *obj, const AVOption *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, const void *dst, double *num, int *den, int64_t *intnum) { switch (o->type) { case AV_OPT_TYPE_FLAGS: *intnum = *(unsigned int*)dst;return 0; -- cgit v1.2.3