frontends/va: Check for errors from end_frame in vlVaEndPicture

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780>
This commit is contained in:
David Rosca 2024-08-22 14:45:43 +02:00 committed by Marge Bot
parent db45d16dfe
commit 49596f70ee

View file

@ -1352,7 +1352,10 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
if (context->desc.base.fence)
context->desc.base.flush_flags = drv->has_external_handles ? 0 : PIPE_FLUSH_ASYNC;
context->decoder->end_frame(context->decoder, context->target, &context->desc.base);
if (context->decoder->end_frame(context->decoder, context->target, &context->desc.base) != 0) {
mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
if (drv->pipe->screen->get_video_param(drv->pipe->screen,
context->decoder->profile,