From: mkver via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Cc: mkver <code@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH] swresample/resample, soxr_resample: Use designated initializers (PR #20508) Date: Fri, 12 Sep 2025 20:24:10 -0000 Message-ID: <175770865094.25.10127320496436176875@463a07221176> (raw) 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 <andreas.rheinhardt@outlook.com> Date: Fri, 12 Sep 2025 22:22:22 +0200 Subject: [PATCH] swresample/resample, soxr_resample: Use designated initializers Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- 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
reply other threads:[~2025-09-12 20:24 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=175770865094.25.10127320496436176875@463a07221176 \ --to=ffmpeg-devel@ffmpeg.org \ --cc=code@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git