[libav-devel] [PATCH 5/5] avcodec: Drop a spurious const from avframe_fill_audio_frame

Luca Barbato lu_zero at gentoo.org
Mon Aug 3 22:51:52 CEST 2015


The resulting mapped array is used as non-const.
---
 libavcodec/avcodec.h | 2 +-
 libavcodec/utils.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5bf9833..ee91d51 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4547,7 +4547,7 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
  * @return            0 on success, negative error code on failure
  */
 int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
-                             enum AVSampleFormat sample_fmt, const uint8_t *buf,
+                             enum AVSampleFormat sample_fmt, uint8_t *buf,
                              int buf_size, int align);
 
 /**
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 2f0997a..8056eaa 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -295,7 +295,7 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height)
 }
 
 int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
-                             enum AVSampleFormat sample_fmt, const uint8_t *buf,
+                             enum AVSampleFormat sample_fmt, uint8_t *buf,
                              int buf_size, int align)
 {
     int ch, planar, needed_size, ret = 0;
-- 
1.9.0



More information about the libav-devel mailing list