aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/opt.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-10-13 13:18:55 +0200
committerAnton Khirnov <anton@khirnov.net>2024-10-16 16:46:29 +0200
commit31b5b3badc2bc3d9d59d5b534c84033c9eb3d577 (patch)
tree22a08b4e0f5fe8503db80df9b54dfa578e5bee82 /libavutil/opt.h
parent86460a0342d7cbd59ad794f515d7d525331b54dd (diff)
downloadffmpeg-31b5b3badc2bc3d9d59d5b534c84033c9eb3d577.tar.gz
lavu/opt: deprecate av_opt_ptr()
It has no more internal callers, and we do not want to support direct pointer access via AVOptions, as that constrains AVOption API extensions.
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 17374211a4..d313679263 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -1071,6 +1071,7 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
* @}
*/
+#if FF_API_OPT_PTR
/**
* Gets a pointer to the requested field in a struct.
* This function allows accessing a struct even when its fields are moved or
@@ -1078,8 +1079,12 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational
*
* @returns a pointer to the field, it can be cast to the correct type and read
* or written to.
+ *
+ * @deprecated direct access to AVOption-exported fields is not supported
*/
+attribute_deprecated
void *av_opt_ptr(const AVClass *avclass, void *obj, const char *name);
+#endif
/**
* Check if given option is set to its default value.