aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_aresample.c
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
commit3dd324427a5de2bf0074e10c1e37986b0327107d (patch)
treece3b06b80fdd5f49b9230847a8c72f9f108cfd29 /libavfilter/af_aresample.c
parent851e0dfe296af1cb96dc5315547ef459cd85c598 (diff)
downloadffmpeg-3dd324427a5de2bf0074e10c1e37986b0327107d.tar.gz
af_aresample: switch to child_class_iterate()
Diffstat (limited to 'libavfilter/af_aresample.c')
-rw-r--r--libavfilter/af_aresample.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index ef10621c35..fb10bd1c33 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -293,10 +293,19 @@ static int request_frame(AVFilterLink *outlink)
return ret;
}
+#if FF_API_CHILD_CLASS_NEXT
static const AVClass *resample_child_class_next(const AVClass *prev)
{
return prev ? NULL : swr_get_class();
}
+#endif
+
+static const AVClass *resample_child_class_iterate(void **iter)
+{
+ const AVClass *c = *iter ? NULL : swr_get_class();
+ *iter = (void*)(uintptr_t)c;
+ return c;
+}
static void *resample_child_next(void *obj, void *prev)
{
@@ -317,7 +326,10 @@ static const AVClass aresample_class = {
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
+#if FF_API_CHILD_CLASS_NEXT
.child_class_next = resample_child_class_next,
+#endif
+ .child_class_iterate = resample_child_class_iterate,
.child_next = resample_child_next,
};