From a7366d68ae551763acc8cd481ff64af04e7a7cd9 Mon Sep 17 00:00:00 2001 From: Feng Jiang Date: Mon, 20 Jun 2022 14:22:28 +0800 Subject: [PATCH] gallium: add key size to the structure pipe_picture_desc Signed-off-by: Feng Jiang Reviewed-by: Liming Sun Part-of: --- src/gallium/frontends/va/picture.c | 1 + src/gallium/include/pipe/p_video_state.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c index bcd23b3ae8a..5f443d5c3f8 100644 --- a/src/gallium/frontends/va/picture.c +++ b/src/gallium/frontends/va/picture.c @@ -283,6 +283,7 @@ handleVAProtectedSliceDataBufferType(vlVaContext *context, vlVaBuffer *buf) context->desc.base.decrypt_key = CALLOC(1, drm_key_size); memcpy(context->desc.base.decrypt_key, encrypted_data, drm_key_size); + context->desc.base.key_size = drm_key_size; context->desc.base.protected_playback = true; } diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index db34fce73ae..1a95dfb39d4 100755 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -137,6 +137,7 @@ struct pipe_picture_desc enum pipe_video_entrypoint entry_point; bool protected_playback; uint8_t *decrypt_key; + uint32_t key_size; enum pipe_format input_format; enum pipe_format output_format; };