Commit 74e27d9e authored by Zhao Zhili's avatar Zhao Zhili

avutil/hwcontext_vulkan: Fix memleaks when transfer to vulkan

Without ff_vk_exec_discard_deps which is called by ff_vk_exec_wait,
the reference count of hwframe context cannot reach zero due to
circular reference created by ff_vk_exec_add_dep_frame.

Fix #10873
Signed-off-by: 's avatarZhao Zhili <zhilizhao@tencent.com>
parent f6f06fb4
......@@ -3394,9 +3394,7 @@ static int transfer_image_buf(AVHWFramesContext *hwfc, AVFrame *f,
if (err < 0)
return err;
/* Wait for the operation to complete when downloading */
if (to_buf)
ff_vk_exec_wait(&p->vkctx, exec);
ff_vk_exec_wait(&p->vkctx, exec);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment