[FFmpeg-cvslog] avutil/samplefmt: Constify some pointees

Andreas Rheinhardt git at videolan.org
Tue Sep 12 11:05:34 EEST 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Sep  6 22:23:37 2023 +0200| [9bf31f60960999b54a41755ed831304ce1f87fee] | committer: Andreas Rheinhardt

avutil/samplefmt: Constify some pointees

This is the samplefmt analog of the imgutils changes
from the preceding commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bf31f60960999b54a41755ed831304ce1f87fee
---

 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, \



More information about the ffmpeg-cvslog mailing list