mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
va: check null context in vlVaDestroyContext
Signed-off-by: Iurie Salomov <iurcic@gmail.com> Reviewed-by: Julien Isorce <j.isorce@samsung.com>
This commit is contained in:
parent
8f3b516f2e
commit
047e3264f6
1 changed files with 4 additions and 0 deletions
|
|
@ -283,6 +283,10 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID context_id)
|
|||
drv = VL_VA_DRIVER(ctx);
|
||||
pipe_mutex_lock(drv->mutex);
|
||||
context = handle_table_get(drv->htab, context_id);
|
||||
if (!context) {
|
||||
pipe_mutex_unlock(drv->mutex);
|
||||
return VA_STATUS_ERROR_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
if (context->decoder) {
|
||||
if (u_reduce_video_profile(context->decoder->profile) ==
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue