From 9bf31f60960999b54a41755ed831304ce1f87fee Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 6 Sep 2023 22:23:37 +0200 Subject: [PATCH] avutil/samplefmt: Constify some pointees This is the samplefmt analog of the imgutils changes from the preceding commit. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 3 +++ libavutil/samplefmt.c | 4 ++-- libavutil/samplefmt.h | 4 ++-- libavutil/version.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index af6bd30423..ce583c6473 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-09-07 - xxxxxxxxxx - lavu 58.21.100 - samplefmt.h + Constify some pointees in av_samples_copy() and av_samples_set_silence(). + 2023-09-07 - xxxxxxxxxx - lavu 58.20.100 - imgutils.h Constify some pointees in av_image_copy(), av_image_copy_uc_from() and av_image_fill_black(). diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c index 6d3ec34dab..e1be5f0547 100644 --- a/libavutil/samplefmt.c +++ b/libavutil/samplefmt.c @@ -219,7 +219,7 @@ int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int return ret; } -int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, +int av_samples_copy(uint8_t * const *dst, uint8_t * const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt) { @@ -243,7 +243,7 @@ int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, return 0; } -int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, +int av_samples_set_silence(uint8_t * const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt) { int planar = av_sample_fmt_is_planar(sample_fmt); diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h index 6bad0e254a..43a57a422c 100644 --- a/libavutil/samplefmt.h +++ b/libavutil/samplefmt.h @@ -246,7 +246,7 @@ int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int * @param nb_channels number of audio channels * @param sample_fmt audio sample format */ -int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, +int av_samples_copy(uint8_t * const *dst, uint8_t * const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt); @@ -259,7 +259,7 @@ int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, * @param nb_channels number of audio channels * @param sample_fmt audio sample format */ -int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, +int av_samples_set_silence(uint8_t * const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt); /** diff --git a/libavutil/version.h b/libavutil/version.h index 605f85cd41..f1946b780f 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 58 -#define LIBAVUTIL_VERSION_MINOR 20 +#define LIBAVUTIL_VERSION_MINOR 21 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \