From 0265bf2065400411ff52f89a1a0faee16ba0c18b Mon Sep 17 00:00:00 2001 From: pacman Date: Mon, 31 Jul 2006 22:19:48 +0000 Subject: [PATCH] Fix bogus pointer addition in the extraction of extradata from BITMAPINFOHEADER. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19283 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index ddb3fc3f11..5e05a27ba3 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -274,8 +274,7 @@ static int init(sh_video_t *sh){ avctx->flags |= CODEC_FLAG_EXTERN_HUFF; avctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER); avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); - memcpy(avctx->extradata, sh->bih+sizeof(BITMAPINFOHEADER), - avctx->extradata_size); + memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size); #if 0 {