aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-05-27 15:34:07 +0200
committerAnton Khirnov <anton@khirnov.net>2020-06-10 12:36:44 +0200
commit2cbd54451994523c334fd5ba88e16bd184701dd0 (patch)
tree50d0f297a2112725e3a790ffb2ae48fe7dc60be0
parent43ed2b86d67ee493a9fd9ef90c13c4cf6ac89257 (diff)
downloadffmpeg-2cbd54451994523c334fd5ba88e16bd184701dd0.tar.gz
AVIOContext: switch to child_class_iterate()
-rw-r--r--libavformat/aviobuf.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index eb0387bdf7..5ba5de01c6 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -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);