[FFmpeg-cvslog] avutil/hwcontext_vulkan: check if created before destroying the instance
Wu Jianhua
git at videolan.org
Wed Nov 24 12:21:28 EET 2021
ffmpeg | branch: master | Wu Jianhua <jianhua.wu at intel.com> | Wed Nov 24 12:11:53 2021 +0800| [7e9e2cf93b6e22eaec72837ab59ac654c19b8d99] | committer: Lynne
avutil/hwcontext_vulkan: check if created before destroying the instance
Signed-off-by: Wu Jianhua <jianhua.wu at intel.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e9e2cf93b6e22eaec72837ab59ac654c19b8d99
---
libavutil/hwcontext_vulkan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 4ac1058181..644ed947f8 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1157,7 +1157,8 @@ static void vulkan_device_free(AVHWDeviceContext *ctx)
vk->DestroyDebugUtilsMessengerEXT(hwctx->inst, p->debug_ctx,
hwctx->alloc);
- vk->DestroyInstance(hwctx->inst, hwctx->alloc);
+ if (hwctx->inst)
+ vk->DestroyInstance(hwctx->inst, hwctx->alloc);
if (p->libvulkan)
dlclose(p->libvulkan);
More information about the ffmpeg-cvslog
mailing list