diff options
author | Zhao Zhili <zhilizhao@tencent.com> | 2024-02-20 22:27:04 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2024-03-01 17:22:14 +0800 |
commit | 74e27d9e3182d2d256d11bb0d5d45633b054bbcb (patch) | |
tree | d8f3a64a9551343103babc05300aab92cbe7ef8f /libavutil/hwcontext_vulkan.c | |
parent | f6f06fb42ade0518830c54602123582652d53b18 (diff) | |
download | ffmpeg-74e27d9e3182d2d256d11bb0d5d45633b054bbcb.tar.gz |
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: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavutil/hwcontext_vulkan.c')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 818ebac2d1..0bf1c22862 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -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; } |