From 15b34d1fd86f252bf811594bbc265a3f977e4775 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 24 Apr 2008 03:22:37 +0300 Subject: vd_ffmpeg.c: Eliminate some compiler warnings Make the functions used in avctx->draw_horiz_band match its type (add a "const"). Add cast to avoid void * arithmetic. --- libmpcodecs/vd_ffmpeg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 97a4fa62cd..5bc4aee2f0 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -64,7 +64,7 @@ static enum PixelFormat get_format(struct AVCodecContext * avctx, static int mc_get_buffer(AVCodecContext *avctx, AVFrame *pic); static void mc_release_buffer(AVCodecContext *avctx, AVFrame *pic); static void mc_render_slice(struct AVCodecContext *s, - AVFrame *src, int offset[4], + const AVFrame *src, int offset[4], int y, int type, int height); #endif @@ -442,7 +442,7 @@ static void uninit(sh_video_t *sh){ } static void draw_slice(struct AVCodecContext *s, - AVFrame *src, int offset[4], + const AVFrame *src, int offset[4], int y, int type, int height){ sh_video_t * sh = s->opaque; uint8_t *source[3]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]}; @@ -758,7 +758,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ || sh->format == mmioFOURCC('R', 'V', '4', '0')) { dp_hdr_t *hdr= (dp_hdr_t*)data; - uint32_t *offsets = (uint32_t*)(data + hdr->chunktab); + uint32_t *offsets = (uint32_t*)((char *)data + hdr->chunktab); uint8_t *offstab = av_malloc((hdr->chunks+1) * 8); uint8_t *buf = data; int chunks = hdr->chunks; @@ -766,7 +766,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ buf[0] = chunks; memcpy(offstab, offsets, (chunks + 1) * 8); - memmove(buf + 1 + (chunks + 1) * 8, data + sizeof(dp_hdr_t), dlen); + memmove(buf + 1 + (chunks + 1) * 8, (char *)data + sizeof(dp_hdr_t), dlen); memcpy(buf + 1, offstab, (chunks + 1) * 8); av_free(offstab); } @@ -1051,7 +1051,7 @@ static void mc_release_buffer(AVCodecContext *avctx, AVFrame *pic){ } static void mc_render_slice(struct AVCodecContext *s, - AVFrame *src, int offset[4], + const AVFrame *src, int offset[4], int y, int type, int height){ int width= s->width; sh_video_t * sh = s->opaque; -- cgit v1.2.3