diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c index f00d33edfe8..610a9108c9e 100644 --- a/src/gallium/frontends/va/picture.c +++ b/src/gallium/frontends/va/picture.c @@ -972,7 +972,6 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff VAStatus vaStatus = VA_STATUS_SUCCESS; unsigned i; - vlVaBuffer *seq_param_buf = NULL; if (!ctx) return VA_STATUS_ERROR_INVALID_CONTEXT; @@ -998,16 +997,8 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff if (buf->type == VAProtectedSliceDataBufferType) handleVAProtectedSliceDataBufferType(context, buf); - else if (buf->type == VAEncSequenceParameterBufferType) - seq_param_buf = buf; } - /* Now process VAEncSequenceParameterBufferType where the encoder is created - * and some default parameters are set to make sure it won't overwrite - * parameters already set by application from earlier buffers. */ - if (seq_param_buf) - vaStatus = handleVAEncSequenceParameterBufferType(drv, context, seq_param_buf); - for (i = 0; i < num_buffers && vaStatus == VA_STATUS_SUCCESS; ++i) { vlVaBuffer *buf = handle_table_get(drv->htab, buffers[i]); @@ -1037,6 +1028,10 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff vaStatus = vlVaHandleVAProcPipelineParameterBufferType(drv, context, buf); break; + case VAEncSequenceParameterBufferType: + vaStatus = handleVAEncSequenceParameterBufferType(drv, context, buf); + break; + case VAEncMiscParameterBufferType: vaStatus = handleVAEncMiscParameterBufferType(context, buf); break;