1
mirror of https://github.com/mpv-player/mpv synced 2025-02-27 09:23:05 +01:00

Use MP_MAX_PLANES as size of arrays passed to mpcodecs_draw_slice.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29098 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-03-29 14:15:09 +00:00
parent f9aefa045f
commit 22b2f80efb
2 changed files with 4 additions and 6 deletions

@ -451,7 +451,7 @@ static void draw_slice(struct AVCodecContext *s,
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]};
uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]};
#if 0
int start=0, i;
int width= s->width;

@ -125,14 +125,12 @@ static void draw_slice (void * _sh, uint8_t * const * src, unsigned int y){
vd_libmpeg2_ctx_t *context = sh->context;
mpeg2dec_t* mpeg2dec = context->mpeg2dec;
const mpeg2_info_t * info = mpeg2_info (mpeg2dec);
int stride[3];
int stride[MP_MAX_PLANES] = {mpeg2dec->decoder.stride, mpeg2dec->decoder.uv_stride, mpeg2dec->decoder.uv_stride};
uint8_t *srcs[MP_MAX_PLANES] = {src[0], src[1], src[2]};
// printf("draw_slice() y=%d \n",y);
stride[0]=mpeg2dec->decoder.stride;
stride[1]=stride[2]=mpeg2dec->decoder.uv_stride;
mpcodecs_draw_slice(sh, (uint8_t **)src,
mpcodecs_draw_slice(sh, srcs,
stride, info->sequence->picture_width,
(y+16<=info->sequence->picture_height) ? 16 :
info->sequence->picture_height-y,