Mercurial > mplayer.hg
diff libvo/vo_vesa.c @ 29062:6a0a30aa2b4a
Consistently use MP_MAX_PLANES as size for plane pointer/stride arrays in libvo.
This might avoid some issues since sws_scale in some cases assumes these
have at least 4 valid entries.
author | reimar |
---|---|
date | Sun, 29 Mar 2009 14:37:21 +0000 |
parents | df67d03dde3b |
children | 0f1b5b68af32 |
line wrap: on
line diff
--- a/libvo/vo_vesa.c Sun Mar 29 14:35:38 2009 +0000 +++ b/libvo/vo_vesa.c Sun Mar 29 14:37:21 2009 +0000 @@ -283,8 +283,8 @@ static int draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y) { int dstride=HAS_DGA()?video_mode_info.XResolution:dstW; - uint8_t *dst[3]= {dga_buffer, NULL, NULL}; - int dstStride[3]; + uint8_t *dst[MP_MAX_PLANES]={dga_buffer}; + int dstStride[MP_MAX_PLANES]={0}; if( mp_msg_test(MSGT_VO,MSGL_DBG3) ) mp_msg(MSGT_VO,MSGL_DBG3, "vo_vesa: draw_slice was called: w=%u h=%u x=%u y=%u\n",w,h,x,y); dstStride[0]=dstride*((dstBpp+7)/8); @@ -423,8 +423,8 @@ { int dstride=HAS_DGA()?video_mode_info.XResolution:dstW; int srcStride[1]; - uint8_t *dst[3]= {dga_buffer, NULL, NULL}; - int dstStride[3]; + uint8_t *dst[MP_MAX_PLANES]={dga_buffer}; + int dstStride[MP_MAX_PLANES]={0}; dstStride[0]=dstride*((dstBpp+7)/8); dstStride[1]= dstStride[2]=dstStride[0]>>1;