av_samples_fill_array: Mark unmodified function argument as const.
authorDiego Biurrun <diego@biurrun.de>
Wed, 11 Apr 2012 12:51:57 +0000 (14:51 +0200)
committerDiego Biurrun <diego@biurrun.de>
Tue, 8 May 2012 09:35:49 +0000 (11:35 +0200)
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 *’

libavutil/samplefmt.c
libavutil/samplefmt.h

index 0a2ffa0..711afac 100644 (file)
@@ -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;
index bb5ba59..1cb01a3 100644 (file)
@@ -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);