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:
committed by
Julien Isorce
parent
8f3b516f2e
commit
047e3264f6
@@ -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) ==
|
||||
|
||||
Reference in New Issue
Block a user