summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/frontends/va/picture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c
index 0956b065caa..eee502b5e4a 100644
--- a/src/gallium/frontends/va/picture.c
+++ b/src/gallium/frontends/va/picture.c
@@ -1033,7 +1033,8 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
case VASliceDataBufferType:
vaStatus = handleVASliceDataBufferType(context, buf);
- slice_offset += buf->size;
+ if (slice_idx)
+ slice_offset += buf->size;
break;
case VAProcPipelineParameterBufferType: