diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-29 14:37:21 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-03-29 14:37:21 +0000 |
commit | b4f5702c0a2643672e77491786a021b51b8d0aec (patch) | |
tree | 2b7c494314765afb76416dc3898032aeedff9059 /libvo/vo_vesa.c | |
parent | c3cf2ce654f54c5dda2618ae9e26614d6fe4ab2a (diff) | |
download | mpv-b4f5702c0a2643672e77491786a021b51b8d0aec.tar.bz2 mpv-b4f5702c0a2643672e77491786a021b51b8d0aec.tar.xz |
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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29101 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_vesa.c')
-rw-r--r-- | libvo/vo_vesa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c index f3d3ff1519..2bbf92e29d 100644 --- a/libvo/vo_vesa.c +++ b/libvo/vo_vesa.c @@ -283,8 +283,8 @@ static void vbeCopyData(uint8_t *image) 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 @@ static int draw_frame(uint8_t *src[]) { 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; |