OSDN Git Service

opt: Add const to av_opt_next
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Wed, 26 Nov 2014 23:11:01 +0000 (00:11 +0100)
committerMartin Storsjö <martin@martin.st>
Thu, 24 Mar 2016 08:34:09 +0000 (10:34 +0200)
Also add const to pointers in static functions within opt.c where
possible/necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil/opt.c
libavutil/opt.h
libavutil/version.h

index f2e3e6d..c5a1933 100644 (file)
@@ -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;
index 8413206..99d727c 100644 (file)
@@ -448,7 +448,7 @@ const AVOption *av_opt_find2(void *obj, const char *name, const char *unit,
  *             or NULL
  * @return next AVOption or NULL
  */
-const AVOption *av_opt_next(void *obj, const AVOption *prev);
+const AVOption *av_opt_next(const void *obj, const AVOption *prev);
 
 /**
  * Iterate over AVOptions-enabled children of obj.
index fdd27e3..235cdfd 100644 (file)
@@ -55,7 +55,7 @@
 
 #define LIBAVUTIL_VERSION_MAJOR 55
 #define LIBAVUTIL_VERSION_MINOR  9
-#define LIBAVUTIL_VERSION_MICRO  0
+#define LIBAVUTIL_VERSION_MICRO  1
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \