Commit 0d8ed994 authored by Chandu Babu N's avatar Chandu Babu N Committed by Andres Gomez

change va max_entrypoints

As encode support is added along with decode, increase max_entrypoints to two.
vaMaxNumEntrypoints was returning incorrect value and causing
memory corruption before this commit

v2: assert when max_entrypoints needs to be bigger

CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Christian König's avatarChristian König <christian.koenig@amd.com>
(cherry picked from commit 1d4cbcdf)
parent 6e9b965e
......@@ -101,6 +101,8 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
if (num_entrypoints == 0)
return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
assert(*num_entrypoints <= ctx->max_entrypoints);
return VA_STATUS_SUCCESS;
}
......
......@@ -169,7 +169,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
*ctx->vtable = vtable;
*ctx->vtable_vpp = vtable_vpp;
ctx->max_profiles = PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH - PIPE_VIDEO_PROFILE_UNKNOWN;
ctx->max_entrypoints = 1;
ctx->max_entrypoints = 2;
ctx->max_attributes = 1;
ctx->max_image_formats = VL_VA_MAX_IMAGE_FORMATS;
ctx->max_subpic_formats = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment