avcodec/rawenc: Cast argument for av_image_copy_to_buffer() to const
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 4 Nov 2015 03:41:22 +0000 (04:41 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 4 Nov 2015 03:41:22 +0000 (04:41 +0100)
Fixes: libavcodec/rawenc.c:64:40: warning: passing argument 3 of av_image_copy_to_buffer from incompatible pointer type [enabled by default]

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/rawenc.c

index b8eabd8..d837056 100644 (file)
@@ -59,7 +59,7 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,
     if ((ret = ff_alloc_packet2(avctx, pkt, ret, ret)) < 0)
         return ret;
     if ((ret = av_image_copy_to_buffer(pkt->data, pkt->size,
-                                       frame->data, frame->linesize,
+                                       (const uint8_t **)frame->data, frame->linesize,
                                        frame->format,
                                        frame->width, frame->height, 1)) < 0)
         return ret;