[FFmpeg-cvslog] pcm: Add const to cast in ENCODE macro.

Diego Biurrun git at videolan.org
Wed Apr 20 04:52:16 CEST 2011


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Tue Apr 19 08:47:59 2011 +0200| [151cd4f98225c0c5cab8fb29e1dbc0719f7f67e3] | committer: Diego Biurrun

pcm: Add const to cast in ENCODE macro.

This fixes a lot of warnings of the sort:
libavcodec/pcm.c:105: warning: cast discards qualifiers from pointer target type

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

 libavcodec/pcm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index e2a7334..9100646 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -71,7 +71,7 @@ static av_cold int pcm_encode_close(AVCodecContext *avctx)
  * @param offset Sample value offset
  */
 #define ENCODE(type, endian, src, dst, n, shift, offset) \
-    samples_##type = (type*)src; \
+    samples_##type = (const type*) src; \
     for(;n>0;n--) { \
         register type v = (*samples_##type++ >> shift) + offset; \
         bytestream_put_##endian(&dst, v); \



More information about the ffmpeg-cvslog mailing list