From b4f5702c0a2643672e77491786a021b51b8d0aec Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 29 Mar 2009 14:37:21 +0000 Subject: 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 --- libvo/vo_x11.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libvo/vo_x11.c') diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index d06c4394ed..e165dc56a2 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -523,8 +523,8 @@ static void flip_page(void) static int draw_slice(uint8_t * src[], int stride[], int w, int h, int x, int y) { - uint8_t *dst[3]; - int dstStride[3]; + uint8_t *dst[MP_MAX_PLANES] = {NULL}; + int dstStride[MP_MAX_PLANES] = {0}; if ((old_vo_dwidth != vo_dwidth || old_vo_dheight != vo_dheight) /*&& y==0 */ && zoomFlag) @@ -557,8 +557,6 @@ static int draw_slice(uint8_t * src[], int stride[], int w, int h, } dst_width = newW; } - dstStride[1] = dstStride[2] = 0; - dst[1] = dst[2] = NULL; dstStride[0] = image_width * ((bpp + 7) / 8); dst[0] = ImageData; -- cgit v1.2.3