]> git.sesse.net Git - ffmpeg/commitdiff
swscale-test: const correctness for pointer variable
authorDiego Biurrun <diego@biurrun.de>
Sun, 6 Dec 2015 11:45:10 +0000 (12:45 +0100)
committerDiego Biurrun <diego@biurrun.de>
Tue, 24 Jan 2017 12:03:57 +0000 (13:03 +0100)
libswscale/swscale-test.c:369:20: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [-Wincompatible-pointer-types]
libswscale/swscale.h:207:5: note: expected ‘const uint8_t * const* {aka const unsigned char * const*}’ but argument is of type ‘uint8_t ** {aka unsigned char **}’

libswscale/tests/swscale.c

index 853a8a723175431a4e8370a10e6b774606564630..364e2a75eb41c96122a13203599b81409961f52b 100644 (file)
@@ -345,7 +345,7 @@ int main(int argc, char **argv)
     enum AVPixelFormat srcFormat = AV_PIX_FMT_NONE;
     enum AVPixelFormat dstFormat = AV_PIX_FMT_NONE;
     uint8_t *rgb_data   = av_malloc(W * H * 4);
-    uint8_t *rgb_src[4] = { rgb_data, NULL, NULL, NULL };
+    const uint8_t *rgb_src[4] = { rgb_data, NULL, NULL, NULL };
     int rgb_stride[4]   = { 4 * W, 0, 0, 0 };
     uint8_t *data       = av_malloc(4 * W * H);
     uint8_t *src[4]     = { data, data + W * H, data + W * H * 2, data + W * H * 3 };