summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2011-12-02 12:58:10 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2011-12-14 08:27:03 +0800
commit2a4fcffc95a456798ed6f1b689cc43e7bd3f66a2 (patch)
tree73791e94e29fac6dec876ce5d0518c1f75a484f0
parentc3ab994edf2a20e9e8c96dce8883c1df99b88849 (diff)
egl/va_egl_x11: fix the number of the allocated elements
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--test/egl/va_egl_x11.c4
1 files changed, 2 insertions, 2 deletions
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);