From 49596f70ee72be8288a315e40a3d71e2db40a39e Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 22 Aug 2024 14:45:43 +0200 Subject: [PATCH] frontends/va: Check for errors from end_frame in vlVaEndPicture Reviewed-By: Sil Vilerino Reviewed-by: Ruijing Dong Part-of: --- src/gallium/frontends/va/picture.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c index b1898f452bd..687bb3b7d0a 100644 --- a/src/gallium/frontends/va/picture.c +++ b/src/gallium/frontends/va/picture.c @@ -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,