You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
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.
This commit is contained in:
@@ -2046,6 +2046,7 @@ const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if FF_API_OPT_PTR
|
||||
void *av_opt_ptr(const AVClass *class, void *obj, const char *name)
|
||||
{
|
||||
const AVOption *opt= av_opt_find2(&class, name, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ, NULL);
|
||||
@@ -2055,6 +2056,7 @@ void *av_opt_ptr(const AVClass *class, void *obj, const char *name)
|
||||
return NULL;
|
||||
return (uint8_t*)obj + opt->offset;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int opt_copy_elem(void *logctx, enum AVOptionType type,
|
||||
void *dst, const void *src)
|
||||
|
||||
Reference in New Issue
Block a user