Message ID | tencent_13E356B59DD0E1C05AE63523813634793E09@qq.com |
---|---|
State | Accepted |
Commit | 74e27d9e3182d2d256d11bb0d5d45633b054bbcb |
Headers | show |
Series | [FFmpeg-devel] avutil/hwcontext_vulkan: Fix memleaks when transfer to vulkan | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index a84713e621..d660f63afe 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -3393,9 +3393,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; }
From: Zhao Zhili <zhilizhao@tencent.com> 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 --- libavutil/hwcontext_vulkan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)