early-access version 1680

This commit is contained in:
pineappleEA
2021-05-13 11:45:27 +02:00
parent 1434d96e7d
commit 66ed389c6f
311 changed files with 6452 additions and 2597 deletions

View File

@@ -1679,8 +1679,9 @@ const AVOption *av_opt_find2(void *obj, const char *name, const char *unit,
if (search_flags & AV_OPT_SEARCH_CHILDREN) {
if (search_flags & AV_OPT_SEARCH_FAKE_OBJ) {
const AVClass *child = NULL;
while (child = av_opt_child_class_next(c, child))
void *iter = NULL;
const AVClass *child;
while (child = av_opt_child_class_iterate(c, &iter))
if (o = av_opt_find2(&child, name, unit, opt_flags, search_flags, NULL))
return o;
} else {
@@ -1715,12 +1716,31 @@ void *av_opt_child_next(void *obj, void *prev)
return NULL;
}
#if FF_API_CHILD_CLASS_NEXT
FF_DISABLE_DEPRECATION_WARNINGS
const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *prev)
{
if (parent->child_class_next)
return parent->child_class_next(prev);
return NULL;
}
FF_ENABLE_DEPRECATION_WARNINGS
#endif
const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter)
{
if (parent->child_class_iterate)
return parent->child_class_iterate(iter);
#if FF_API_CHILD_CLASS_NEXT
FF_DISABLE_DEPRECATION_WARNINGS
if (parent->child_class_next) {
*iter = parent->child_class_next(*iter);
return *iter;
}
FF_ENABLE_DEPRECATION_WARNINGS
#endif
return NULL;
}
void *av_opt_ptr(const AVClass *class, void *obj, const char *name)
{
@@ -2100,6 +2120,8 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer,
av_freep(&buf);
}
}
av_bprint_finalize(&bprint, buffer);
ret = av_bprint_finalize(&bprint, buffer);
if (ret < 0)
return ret;
return 0;
}