diff options
author | Chandu Babu N <mailto:[email protected]> | 2017-06-17 11:49:13 +0000 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2017-06-28 20:15:04 +0300 |
commit | 0d8ed994111db1f8e80b3101e8a987f99e70a571 (patch) | |
tree | 8203542414b0034d7dd763590800a06375799d6a | |
parent | 6e9b965e4e70879f68fd543241ec36e91b169597 (diff) |
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: [email protected]
Reviewed-by: Christian König <[email protected]>
(cherry picked from commit 1d4cbcdf285730d8e692e10c44cb5dc7e683efc1)
-rw-r--r-- | src/gallium/state_trackers/va/config.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/va/context.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c index 05f97a01eeb..68b92300e7f 100644 --- a/src/gallium/state_trackers/va/config.c +++ b/src/gallium/state_trackers/va/config.c @@ -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; } diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index cc4011ee49b..27bc8bfecb0 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -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; |