1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

AVIOContext: switch to child_class_iterate()

This commit is contained in:
Anton Khirnov 2020-05-27 15:34:07 +02:00
parent 43ed2b86d6
commit 2cbd544519

View File

@ -48,10 +48,19 @@ static void *ff_avio_child_next(void *obj, void *prev)
return prev ? NULL : s->opaque;
}
#if FF_API_CHILD_CLASS_NEXT
static const AVClass *ff_avio_child_class_next(const AVClass *prev)
{
return prev ? NULL : &ffurl_context_class;
}
#endif
static const AVClass *child_class_iterate(void **iter)
{
const AVClass *c = *iter ? NULL : &ffurl_context_class;
*iter = (void*)(uintptr_t)c;
return c;
}
#define OFFSET(x) offsetof(AVIOContext,x)
#define E AV_OPT_FLAG_ENCODING_PARAM
@ -67,7 +76,10 @@ const AVClass ff_avio_class = {
.version = LIBAVUTIL_VERSION_INT,
.option = ff_avio_options,
.child_next = ff_avio_child_next,
#if FF_API_CHILD_CLASS_NEXT
.child_class_next = ff_avio_child_class_next,
#endif
.child_class_iterate = child_class_iterate,
};
static void fill_buffer(AVIOContext *s);