[FFmpeg-cvslog] av_samples_fill_array: Mark unmodified function argument as const.

Diego Biurrun git at videolan.org
Tue May 8 22:07:21 CEST 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Apr 11 14:51:57 2012 +0200| [ce473de921d56abadc417ba267505fb5165b171c] | committer: Diego Biurrun

av_samples_fill_array: Mark unmodified function argument as const.

libavcodec/utils.c:274: warning: passing argument 3 of ‘av_samples_fill_arrays’ discards qualifiers from pointer target type
./libavutil/samplefmt.h:151: note: expected ‘uint8_t *’ but argument is of type ‘const uint8_t *’

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

 libavutil/samplefmt.c |    2 +-
 libavutil/samplefmt.h |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c
index 0a2ffa0..711afac 100644
--- a/libavutil/samplefmt.c
+++ b/libavutil/samplefmt.c
@@ -143,7 +143,7 @@ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
 }
 
 int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
-                           uint8_t *buf, int nb_channels, int nb_samples,
+                           const uint8_t *buf, int nb_channels, int nb_samples,
                            enum AVSampleFormat sample_fmt, int align)
 {
     int ch, planar, buf_size, line_size;
diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h
index bb5ba59..1cb01a3 100644
--- a/libavutil/samplefmt.h
+++ b/libavutil/samplefmt.h
@@ -170,7 +170,8 @@ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
  * @param align            buffer size alignment (0 = default, 1 = no alignment)
  * @return                 0 on success or a negative error code on failure
  */
-int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, uint8_t *buf,
+int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
+                           const uint8_t *buf,
                            int nb_channels, int nb_samples,
                            enum AVSampleFormat sample_fmt, int align);
 



More information about the ffmpeg-cvslog mailing list