diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c index 20d58c52f24..2843983a753 100644 --- a/src/gallium/frontends/va/picture.c +++ b/src/gallium/frontends/va/picture.c @@ -562,6 +562,7 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff VAStatus vaStatus = VA_STATUS_SUCCESS; unsigned i; + unsigned slice_param_idx = 0; if (!ctx) return VA_STATUS_ERROR_INVALID_CONTEXT; @@ -602,7 +603,7 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff break; case VASliceParameterBufferType: - handleSliceParameterBuffer(context, buf, i); + handleSliceParameterBuffer(context, buf, slice_param_idx++); break; case VASliceDataBufferType: diff --git a/src/gallium/frontends/va/picture_av1.c b/src/gallium/frontends/va/picture_av1.c index 1ac83fa4bd8..d48163647dc 100644 --- a/src/gallium/frontends/va/picture_av1.c +++ b/src/gallium/frontends/va/picture_av1.c @@ -351,6 +351,6 @@ void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, un { VASliceParameterBufferAV1 *av1 = buf->data; - context->desc.av1.slice_parameter.slice_data_size[num >> 1] = av1->slice_data_size; - context->desc.av1.slice_parameter.slice_data_offset[num >> 1] = av1->slice_data_offset; + context->desc.av1.slice_parameter.slice_data_size[num] = av1->slice_data_size; + context->desc.av1.slice_parameter.slice_data_offset[num] = av1->slice_data_offset; }