From patchwork Thu May 28 20:15:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 19945 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 7527544A30B for ; Thu, 28 May 2020 23:16:37 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 638E668AFEB; Thu, 28 May 2020 23:16:37 +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 4C4CB68AE41 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 5E1EB28A6E6 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 GV0O_lN1fF4d 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 498BC28A6FF for ; Thu, 28 May 2020 22:16:23 +0200 (CEST) Received: from localhost (quelana.khirnov.net [IPv6:::1]) by quelana.khirnov.net (Postfix) with ESMTP id 1638120279 for ; Thu, 28 May 2020 22:16:23 +0200 (CEST) Received: from quelana.khirnov.net ([IPv6:::1]) by localhost (quelana.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Ktfpf4snW3cJ for ; Thu, 28 May 2020 22:16:22 +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 AC6B422EBE for ; Thu, 28 May 2020 22:16:15 +0200 (CEST) Received: by libav.daenerys.khirnov.net (Postfix, from userid 1000) id 9274220E00FC; Thu, 28 May 2020 22:16:11 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 May 2020 22:15:52 +0200 Message-Id: <20200528201559.22618-10-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 10/17] af_resample: 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/af_resample.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index e3c6a20696..785cd0c7f4 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -306,10 +306,19 @@ fail: return ret; } +#if FF_API_CHILD_CLASS_NEXT static const AVClass *resample_child_class_next(const AVClass *prev) { return prev ? NULL : avresample_get_class(); } +#endif + +static const AVClass *resample_child_class_iterate(void **iter) +{ + const AVClass *c = *iter ? NULL : avresample_get_class(); + *iter = (void*)(uintptr_t)c; + return c; +} static void *resample_child_next(void *obj, void *prev) { @@ -321,7 +330,10 @@ static const AVClass resample_class = { .class_name = "resample", .item_name = av_default_item_name, .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, };