From 2a4fcffc95a456798ed6f1b689cc43e7bd3f66a2 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 2 Dec 2011 12:58:10 +0800 Subject: egl/va_egl_x11: fix the number of the allocated elements Signed-off-by: Xiang, Haihao --- test/egl/va_egl_x11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/egl/va_egl_x11.c b/test/egl/va_egl_x11.c index 1c04e3b..7d7521d 100644 --- a/test/egl/va_egl_x11.c +++ b/test/egl/va_egl_x11.c @@ -355,14 +355,14 @@ va_egl_init_va_egl(struct va_egl_context *ctx) unsigned int *target_list = NULL; EGLint *img_attribs = NULL; - num_max_targets = vaMaxNumSurfaceTargetsEGL(ctx->va_dpy); + num_targets = num_max_targets = vaMaxNumSurfaceTargetsEGL(ctx->va_dpy); if (num_max_targets < 1) { printf("Error: vaMaxNumSurfaceTargetsEGL() returns %d\n", num_max_targets); return -1; } - num_max_attributes = vaMaxNumSurfaceAttributesEGL(ctx->va_dpy); + num_attribs = num_max_attributes = vaMaxNumSurfaceAttributesEGL(ctx->va_dpy); if (num_max_attributes < 1) { printf("Error: vaMaxNumSurfaceAttributesEGL() returns %d\n", num_max_attributes); -- cgit v1.2.3