diff mbox series

[FFmpeg-devel,14/17] vf_spp: switch to child_class_iterate()

Message ID 20200528201559.22618-14-anton@khirnov.net
State Accepted
Commit c7d8d8d8d91833737ec1b94c9345bcfba5935ee6
Headers show
Series [FFmpeg-devel,01/17] Remove unnecessary use of avcodec_close(). | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Anton Khirnov May 28, 2020, 8:15 p.m. UTC
---
 libavfilter/vf_spp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c
index a83b1195c0..4bcc6429e0 100644
--- a/libavfilter/vf_spp.c
+++ b/libavfilter/vf_spp.c
@@ -44,10 +44,19 @@  enum mode {
     NB_MODES
 };
 
+#if FF_API_CHILD_CLASS_NEXT
 static const AVClass *child_class_next(const AVClass *prev)
 {
     return prev ? NULL : avcodec_dct_get_class();
 }
+#endif
+
+static const AVClass *child_class_iterate(void **iter)
+{
+    const AVClass *c = *iter ? NULL : avcodec_dct_get_class();
+    *iter = (void*)(uintptr_t)c;
+    return c;
+}
 
 static void *child_next(void *obj, void *prev)
 {
@@ -74,7 +83,10 @@  static const AVClass spp_class = {
     .option           = spp_options,
     .version          = LIBAVUTIL_VERSION_INT,
     .category         = AV_CLASS_CATEGORY_FILTER,
+#if FF_API_CHILD_CLASS_NEXT
     .child_class_next = child_class_next,
+#endif
+    .child_class_iterate = child_class_iterate,
     .child_next       = child_next,
 };