#include <float.h>
#if FF_API_OLD_AVOPTIONS
-const AVOption *av_next_option(void *obj, const AVOption *last)
+const AVOption *av_next_option(FF_CONST_AVUTIL55 void *obj, const AVOption *last)
{
return av_opt_next(obj, last);
}
#endif
-const AVOption *av_opt_next(void *obj, const AVOption *last)
+const AVOption *av_opt_next(FF_CONST_AVUTIL55 void *obj, const AVOption *last)
{
const AVClass *class;
if (!obj)
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;
return 0;
}
-int av_opt_copy(void *dst, void *src)
+int av_opt_copy(void *dst, FF_CONST_AVUTIL55 void *src)
{
const AVOption *o = NULL;
const AVClass *c;
#include "log.h"
#include "pixfmt.h"
#include "samplefmt.h"
+#include "version.h"
/**
* @defgroup avoptions AVOptions
AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
attribute_deprecated const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
-attribute_deprecated const AVOption *av_next_option(void *obj, const AVOption *last);
+attribute_deprecated const AVOption *av_next_option(FF_CONST_AVUTIL55 void *obj, const AVOption *last);
#endif
/**
* or NULL
* @return next AVOption or NULL
*/
-const AVOption *av_opt_next(void *obj, const AVOption *prev);
+const AVOption *av_opt_next(FF_CONST_AVUTIL55 void *obj, const AVOption *prev);
/**
* Iterate over AVOptions-enabled children of obj.
* @param src Object to copy into
* @return 0 on success, negative on error
*/
-int av_opt_copy(void *dest, void *src);
+int av_opt_copy(void *dest, FF_CONST_AVUTIL55 void *src);
/**
* Get a default list of allowed ranges for the given option.
#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55)
#endif
+#ifndef FF_CONST_AVUTIL55
+#if LIBAVUTIL_VERSION_MAJOR >= 55
+#define FF_CONST_AVUTIL55 const
+#else
+#define FF_CONST_AVUTIL55
+#endif
+#endif
/**
* @}