lavu/vulkan: check for initialization when freeing buffers

What happens on startup is that ffmpeg.c initializes the filter,
then frees it without feeding a single frame through. With no
input frame, the filter lacks a hardware device. The rest of the
uninit code checks if Vulkan objects exist, which they must if there's
a hardware device, but vk->DeviceWaitIdle does not require an object.
So, add a check for it.
pull/375/head
Lynne 3 years ago
parent a132614bba
commit 135e1c0adf
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 2
      libavutil/vulkan.c

@ -350,7 +350,7 @@ void ff_vk_free_buf(FFVulkanContext *s, FFVkBuffer *buf)
{
FFVulkanFunctions *vk = &s->vkfn;
if (!buf)
if (!buf || !s->hwctx)
return;
vk->DeviceWaitIdle(s->hwctx->act_dev);

Loading…
Cancel
Save