From 1ffca685dbfcbe6e87b36917999b1550cd3e2146 Mon Sep 17 00:00:00 2001 From: Alexander Prikhodko Date: Wed, 7 Apr 2010 12:07:46 +0300 Subject: [PATCH] Fix GCC warning about sws_scale type cast --- input/ffms.c | 2 +- input/lavf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/input/ffms.c b/input/ffms.c index 14962c7..a54ae49 100644 --- a/input/ffms.c +++ b/input/ffms.c @@ -207,7 +207,7 @@ static int read_frame( x264_picture_t *p_pic, hnd_t handle, int i_frame ) * With threaded input, copying the pointers would result in the data changing during encoding. * FIXME: don't do redundant sws_scales for singlethreaded input, or fix FFMS to allow * multiple FFMS_Frame buffers. */ - sws_scale( h->scaler, (uint8_t**)frame->Data, (int*)frame->Linesize, 0, + sws_scale( h->scaler, (const uint8_t * const *)frame->Data, (int*)frame->Linesize, 0, frame->EncodedHeight, p_pic->img.plane, p_pic->img.i_stride ); const FFMS_FrameInfo *info = FFMS_GetFrameInfo( h->track, i_frame ); diff --git a/input/lavf.c b/input/lavf.c index 6ecc6b0..7daf5f7 100644 --- a/input/lavf.c +++ b/input/lavf.c @@ -121,7 +121,7 @@ static int read_frame_internal( x264_picture_t *p_pic, lavf_hnd_t *h, int i_fram if( check_swscale( h, c, i_frame ) ) return -1; /* FIXME: avoid sws_scale where possible (no colorspace conversion). */ - sws_scale( h->scaler, frame->data, frame->linesize, 0, c->height, p_pic->img.plane, p_pic->img.i_stride ); + sws_scale( h->scaler, (const uint8_t * const *)frame->data, frame->linesize, 0, c->height, p_pic->img.plane, p_pic->img.i_stride ); if( info ) info->interlaced = frame->interlaced_frame; -- 1.7.0.2.msysgit.0