summaryrefslogtreecommitdiffstats
path: root/libvo/vo_x11.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-29 14:37:21 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-29 14:37:21 +0000
commitb4f5702c0a2643672e77491786a021b51b8d0aec (patch)
tree2b7c494314765afb76416dc3898032aeedff9059 /libvo/vo_x11.c
parentc3cf2ce654f54c5dda2618ae9e26614d6fe4ab2a (diff)
downloadmpv-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_x11.c')
-rw-r--r--libvo/vo_x11.c6
1 files changed, 2 insertions, 4 deletions
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;