summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-24 03:22:37 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-25 03:29:27 +0300
commit15b34d1fd86f252bf811594bbc265a3f977e4775 (patch)
tree783109707156a7dbee3b4505cdfcdb060d5a5c3b
parentf8934a5f12aea53a57b728ad0b56d6198a545e8c (diff)
downloadmpv-15b34d1fd86f252bf811594bbc265a3f977e4775.tar.bz2
mpv-15b34d1fd86f252bf811594bbc265a3f977e4775.tar.xz
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.
-rw-r--r--libmpcodecs/vd_ffmpeg.c10
1 files changed, 5 insertions, 5 deletions
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;