From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id A46774C74E for ; Fri, 12 Sep 2025 20:24:30 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'aSZDaWFCXpnbWNN75RUbSN5z0uZt1cznI0f49EbDmWw=', expected b'Y9ka9z7/D12xXf/0DWQpRsuVVCu/oTB7Je8w9sUfEuw=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1757708661; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=aSZDaWFCXpnbWNN75RUbSN5z0uZt1cznI0f49EbDmWw=; b=SbBzysOUa8BzNShLUCe87BVZ12BdYOeLJd/2FPplCQwNOZSw/0mymjPK1VD9Uo9qoF8Ef g6zQQA1bmrhB644QjAuA0dGV3lLtKF11jGUigYzp9JDWuqUQANeVGXtdhjdjTl5mqcZUWc3 gU6j3vdkDSAtil4A/Z/ese2GZ6UjQZmLzW7dCkXUZmqWxtxc4Nna/qhevXUkpva4ZDF62jf N+V1vggRdxyRWcdhh91y/dKxgRxNYHKOo9yKYeZGNX3rX9P1rcgdkn6gl7GDLReC1FAtA+9 pC85XbDHXrywSJr17jOk5Z5rIoPdwTYX7HASANvGEQImY1PS5ML3jsP+F6ew== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id B9C2468E82B; Fri, 12 Sep 2025 23:24:21 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1757708660; b=huzNuxkaaFpRWxQ8Mup3n24aiwBR3tf1ycvDJ6OyET1tyMBikYLkxjIKw+APxaHdxc269 Qc1akHkdiOsZHT8knQvcQRMakiUO7w3HkBBpV7yNVIq3Y7so8L/Y+fK2o/UpDSFKJZN15oV t/8eeSu2JFsXS3y6yVhMx3nyUJa1N1H5iaV81v0eNGrROKdPPjUoljCvauBTb/DW9oRlCFR VsP43EpVk1V13xIxdwEFWbBjVqPdLMMoWZTU3E9KMGoCRueUk0if9FmJymd8bDmCudbwK7+ q8xThr1NngxIpicudqN8EIms2jX/ulAF/FcvSLe2I83YT6ZmufluVRcOUaMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1757708660; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=bF95qNz7w9DiBaC1Sakhw3StUwKyWY8KnbeaxdVRePg=; b=WbLhXRAeRiHES9FxYocIrldKOd6pUE+F0cx4+tVJ3jBDJIeEPvxec0mqYJxpjCg6xN7mQ ZWr2BGvrNaMs2yHHPY8IHblI5IgUr5Navw+4o6PY4rigq/kYrFjzdti/qe0cpExAO8yoM06 u6KBgqlErNBx2l2Uwrm6MewCPnH866TLGtXmwc4apG2q9wxovz6RCInxDqe4PtbFygEBNEp Tk5lOGs+1rYsYZgXmRmvpzyhAEJ+kU/ZViTYWGfVIt86G2Qs1gV8HVJQgxhHC0UwWZHo6U+ WtjD5J9h7GBEqzpc/FgbQB4kwZ7L77R5kPv5EEhOPAjax+cd0mX5ZIkL1c+A== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1757708650; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=Y9ka9z7/D12xXf/0DWQpRsuVVCu/oTB7Je8w9sUfEuw=; b=QQxRYWiJRFdJf699//ZzV/d3T2TuzU6Cr+ZtvHjyUn1wUgpAwLKI2KkszG6SlbIm7Dvr6 5gZgDEXPmVnXi0mZp68Nkl3HusTr1BEmxVR57z2yaSNPBk2VyxLHbZut+yx9PtrkA+nfEJD 971lOwYz+hfYaHcL9LGZxHPkn8jdf6BPFfwvuAJ6bAmJuA7sAL6smjKHiXTUC1FetuXUgS6 PzlZUuNZwU02Z75+e/nU9FaER3BGJDZ+K8G7qrXzW4Kuj6TzffVNdYPD3TJkb2zWbaNJ/7F Oix5MhNWGP07vPz29UdKTjRAYPwl7gABL/VL2I9QCCSyY/cg3XRDxdgeSw7A== Received: from 3f9d35a0eedc (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id B616D68E7DE for ; Fri, 12 Sep 2025 23:24:10 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Sep 2025 20:24:10 -0000 Message-ID: <175770865094.25.10127320496436176875@463a07221176> Message-ID-Hash: YLM2MGBW6LOZBDRT4MATQDJB4SZZU67M X-Message-ID-Hash: YLM2MGBW6LOZBDRT4MATQDJB4SZZU67M X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] swresample/resample, soxr_resample: Use designated initializers (PR #20508) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: mkver via ffmpeg-devel Cc: mkver Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20508 opened by mkver URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20508 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20508.patch >>From 1c050139a9ae49bd147039975d6d7a67ee70ee66 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 12 Sep 2025 22:22:22 +0200 Subject: [PATCH] swresample/resample, soxr_resample: Use designated initializers Signed-off-by: Andreas Rheinhardt --- libswresample/resample.c | 18 +++++++++--------- libswresample/soxr_resample.c | 11 ++++++++--- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/libswresample/resample.c b/libswresample/resample.c index 2b8571bbd6..16d48e93da 100644 --- a/libswresample/resample.c +++ b/libswresample/resample.c @@ -501,13 +501,13 @@ static int invert_initial_buffer(ResampleContext *c, AudioData *dst, const Audio return FFMAX(res, 0); } -struct Resampler const swri_resampler={ - resample_init, - resample_free, - multiple_resample, - resample_flush, - set_compensation, - get_delay, - invert_initial_buffer, - get_out_samples, +const struct Resampler swri_resampler = { + .init = resample_init, + .free = resample_free, + .multiple_resample = multiple_resample, + .flush = resample_flush, + .set_compensation = set_compensation, + .get_delay = get_delay, + .invert_initial_buffer = invert_initial_buffer, + .get_out_samples = get_out_samples, }; diff --git a/libswresample/soxr_resample.c b/libswresample/soxr_resample.c index 00d79878ca..cc5b4db5d4 100644 --- a/libswresample/soxr_resample.c +++ b/libswresample/soxr_resample.c @@ -123,7 +123,12 @@ static int64_t get_out_samples(struct SwrContext *s, int in_samples){ return (int64_t)(out_samples + delayed_samples + 1 + .5); } -struct Resampler const swri_soxr_resampler={ - create, destroy, process, flush, NULL /* set_compensation */, get_delay, - invert_initial_buffer, get_out_samples +const struct Resampler swri_soxr_resampler = { + .init = create, + .free = destroy, + .multiple_resample = process, + .flush = flush, + .get_delay = get_delay, + .invert_initial_buffer = invert_initial_buffer, + .get_out_samples = get_out_samples, }; -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org