From patchwork Thu May 28 20:15:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 19944 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id DE8F344A30B for ; Thu, 28 May 2020 23:16:36 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CD6AD68AFE6; Thu, 28 May 2020 23:16:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.red.khirnov.net (unknown [176.97.15.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E98468AE4C for ; Thu, 28 May 2020 23:16:31 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail.red.khirnov.net (Postfix) with ESMTP id 32F9628A6E7 for ; Thu, 28 May 2020 22:16:29 +0200 (CEST) Received: from mail.red.khirnov.net ([IPv6:::1]) by localhost (mail.red.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id L2KGsjd_4XtA for ; Thu, 28 May 2020 22:16:28 +0200 (CEST) Received: from quelana.khirnov.net (quelana.khirnov.net [IPv6:2a00:c500:561:200::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "quelana.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail.red.khirnov.net (Postfix) with ESMTPS id 73CD328A6F5 for ; Thu, 28 May 2020 22:16:22 +0200 (CEST) Received: from localhost (quelana.khirnov.net [IPv6:::1]) by quelana.khirnov.net (Postfix) with ESMTP id 4244922DCD for ; Thu, 28 May 2020 22:16:22 +0200 (CEST) Received: from quelana.khirnov.net ([IPv6:::1]) by localhost (quelana.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Yulcn7_SYOd6 for ; Thu, 28 May 2020 22:16:21 +0200 (CEST) Received: from libav.daenerys.khirnov.net (libav.daenerys.khirnov.net [IPv6:2a00:c500:561:201::7]) by quelana.khirnov.net (Postfix) with ESMTP id 8FBC222E4E for ; Thu, 28 May 2020 22:16:15 +0200 (CEST) Received: by libav.daenerys.khirnov.net (Postfix, from userid 1000) id C4E5120E011B; Thu, 28 May 2020 22:16:12 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 May 2020 22:15:56 +0200 Message-Id: <20200528201559.22618-14-anton@khirnov.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200528201559.22618-1-anton@khirnov.net> References: <20200528201559.22618-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 14/17] vf_spp: switch to child_class_iterate() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavfilter/vf_spp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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, };