mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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.
This commit is contained in:
parent
a132614bba
commit
135e1c0adf
@ -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…
Reference in New Issue
Block a user