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.rheinha...@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.rheinha...@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-le...@ffmpeg.org