Just for naming consistency, no functional changes.
---
libavutil/opt.c | 7 +++++++
libavutil/opt.h | 11 ++++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 2042c6a..85efa8e 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -47,8 +47,15 @@ const AVOption *av_find_opt(void *v, const char *name, const
char *unit, int mas
}
#endif
+#if FF_API_OLD_AVOPTIONS
const AVOption *av_next_option(void *obj, const AVOption *last)
{
+ return av_opt_next(obj, last);
+}
+#endif
+
+const AVOption *av_opt_next(void *obj, const AVOption *last)
+{
if (last && last[1].name) return ++last;
else if (last) return NULL;
else return (*(AVClass**)obj)->option;
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 0879a9b..57245ff 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -150,8 +150,8 @@ attribute_deprecated double av_get_double(void *obj, const
char *name, const AVO
attribute_deprecated AVRational av_get_q(void *obj, const char *name, const
AVOption **o_out);
attribute_deprecated 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);
#endif
-const AVOption *av_next_option(void *obj, const AVOption *last);
/**
* Show the obj options.
@@ -286,6 +286,15 @@ const AVOption *av_opt_find(void *obj, const char *name,
const char *unit,
int opt_flags, int search_flags);
/**
+ * Iterate over all AVOptions belonging to obj.
+ *
+ * @param prev result of the previous call to av_opt_next on this object
+ * or NULL
+ * @return next AVOption or NULL
+ */
+const AVOption *av_opt_next(void *obj, const AVOption *prev);
+
+/**
* Iterate over AVOptions-enabled children of obj.
*
* @param prev result of a previous call to this function or NULL
--
1.7.6.3
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel