From 9198397115bfef265ebb1ab04e4991defa908d11 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 6 Jan 2015 22:05:13 +0100 Subject: [PATCH] avcodec/ffv1enc: Fix incompatible pointer type warning Signed-off-by: Michael Niedermayer --- libavcodec/ffv1enc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 4b16a168db..39a1501fe7 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1017,7 +1017,7 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs) } } -static void choose_rct_params(FFV1Context *fs, uint8_t *src[3], const int stride[3], int w, int h) +static void choose_rct_params(FFV1Context *fs, const uint8_t *src[3], const int stride[3], int w, int h) { #define NB_Y_COEFF 15 static const int rct_y_coeff[15][2] = { @@ -1053,14 +1053,14 @@ static void choose_rct_params(FFV1Context *fs, uint8_t *src[3], const int stride int b, g, r; int ab, ag, ar; if (lbd) { - unsigned v = *((uint32_t*)(src[0] + x*4 + stride[0]*y)); + unsigned v = *((const uint32_t*)(src[0] + x*4 + stride[0]*y)); b = v & 0xFF; g = (v >> 8) & 0xFF; r = (v >> 16) & 0xFF; } else { - b = *((uint16_t*)(src[0] + x*2 + stride[0]*y)); - g = *((uint16_t*)(src[1] + x*2 + stride[1]*y)); - r = *((uint16_t*)(src[2] + x*2 + stride[2]*y)); + b = *((const uint16_t*)(src[0] + x*2 + stride[0]*y)); + g = *((const uint16_t*)(src[1] + x*2 + stride[1]*y)); + r = *((const uint16_t*)(src[2] + x*2 + stride[2]*y)); } ar = r - lastr;