From 8c3ab3094b81ffc4525b2038d10aa5d744f16d71 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 18 Nov 2011 21:58:27 +0100 Subject: [PATCH] =?UTF-8?q?sws:=20Fix:=20libswscale/swscale=5Funscaled.c:8?= =?UTF-8?q?05:5:=20warning:=20passing=20argument=201=20of=20=E2=80=98check?= =?UTF-8?q?=5Fimage=5Fpointers=E2=80=99=20from=20incompatible=20pointer=20?= =?UTF-8?q?type=20libswscale/swscale=5Funscaled.c:774:12:=20note:=20expect?= =?UTF-8?q?ed=20=E2=80=98uint8=5Ft=20**=E2=80=99=20but=20argument=20is=20o?= =?UTF-8?q?f=20type=20=E2=80=98const=20uint8=5Ft=20*=20const*=E2=80=99=20l?= =?UTF-8?q?ibswscale/swscale=5Funscaled.c:809:5:=20warning:=20passing=20ar?= =?UTF-8?q?gument=201=20of=20=E2=80=98check=5Fimage=5Fpointers=E2=80=99=20?= =?UTF-8?q?discards=20qualifiers=20from=20pointer=20target=20type=20libsws?= =?UTF-8?q?cale/swscale=5Funscaled.c:774:12:=20note:=20expected=20?= =?UTF-8?q?=E2=80=98uint8=5Ft=20**=E2=80=99=20but=20argument=20is=20of=20t?= =?UTF-8?q?ype=20=E2=80=98uint8=5Ft=20*=20const*=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Niedermayer --- libswscale/swscale_unscaled.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index d6c16e3cda..02f8e9c1cf 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -771,7 +771,7 @@ static void reset_ptr(const uint8_t* src[], int format) } } -static int check_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, +static int check_image_pointers(const uint8_t * const data[4], enum PixelFormat pix_fmt, const int linesizes[4]) { const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; @@ -806,7 +806,7 @@ int sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[], av_log(c, AV_LOG_ERROR, "bad src image pointers\n"); return 0; } - if (!check_image_pointers(dst, c->dstFormat, dstStride)) { + if (!check_image_pointers((const uint8_t* const*)dst, c->dstFormat, dstStride)) { av_log(c, AV_LOG_ERROR, "bad dst image pointers\n"); return 0; }