[FFmpeg-cvslog] libvpx: Cast a pointer to const to squelch a warning

Diego Biurrun git at videolan.org
Sun Mar 19 22:26:05 EET 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Aug 24 17:00:11 2016 +0200| [4ab496261b12e20ef293b7adca4fcaef1a67c538] | committer: Diego Biurrun

libvpx: Cast a pointer to const to squelch a warning

libavcodec/libvpxdec.c:100:57: warning: passing argument 3 of 'av_image_copy' from incompatible pointer type
         av_image_copy(picture->data, picture->linesize, img->planes,
libavutil/imgutils.h:116:6: note: expected 'const uint8_t **' but argument is of type 'unsigned char **'
 void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],

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

 libavcodec/libvpxdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 93a720f..6d3b29f 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -97,7 +97,7 @@ static int vp8_decode(AVCodecContext *avctx,
         }
         if ((ret = ff_get_buffer(avctx, picture, 0)) < 0)
             return ret;
-        av_image_copy(picture->data, picture->linesize, img->planes,
+        av_image_copy(picture->data, picture->linesize, (const uint8_t **) img->planes,
                       img->stride, avctx->pix_fmt, img->d_w, img->d_h);
 #if VPX_IMAGE_ABI_VERSION >= 4
         switch (img->range) {



More information about the ffmpeg-cvslog mailing list