The branch, master has been updated
via b02f1129ebbaaef1c4dc79cd1d68004cab433323 (commit)
from 4c80cda08ab41a37bea430b5803d84298a145b2c (commit)
- Log -----------------------------------------------------------------
commit b02f1129ebbaaef1c4dc79cd1d68004cab433323
Author: Andreas Rheinhardt <[email protected]>
AuthorDate: Fri Sep 12 22:22:22 2025 +0200
Commit: James Almer <[email protected]>
CommitDate: Sat Sep 13 21:25:40 2025 +0000
swresample/resample, soxr_resample: Use designated initializers
Signed-off-by: Andreas Rheinhardt <[email protected]>
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,
};
-----------------------------------------------------------------------
Summary of changes:
libswresample/resample.c | 18 +++++++++---------
libswresample/soxr_resample.c | 11 ++++++++---
2 files changed, 17 insertions(+), 12 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]