fix(linux/vulkan): guard deprecated FFmpeg Vulkan queue lock/unlock (#5005)

This commit is contained in:
neatnoise
2026-04-17 03:17:15 +02:00
committed by GitHub
parent 3527320311
commit a40f27f34e
2 changed files with 6 additions and 1 deletions

View File

@@ -770,18 +770,21 @@ namespace vk {
submit.signalSemaphoreCount = sem_count;
submit.pSignalSemaphores = signal_sems.data();
// Lock the queue (FFmpeg requires this)
#if !defined(FF_API_VULKAN_SYNC_QUEUES) || FF_API_VULKAN_SYNC_QUEUES
vk_dev.ctx->lock_queue(
(AVHWDeviceContext *) ((AVHWFramesContext *) hw_frames_ctx->data)->device_ref->data,
vk_dev.compute_qf,
0
);
#endif
auto res = vkQueueSubmit(vk_dev.compute_queue, 1, &submit, VK_NULL_HANDLE);
#if !defined(FF_API_VULKAN_SYNC_QUEUES) || FF_API_VULKAN_SYNC_QUEUES
vk_dev.ctx->unlock_queue(
(AVHWDeviceContext *) ((AVHWFramesContext *) hw_frames_ctx->data)->device_ref->data,
vk_dev.compute_qf,
0
);
#endif
if (res != VK_SUCCESS) {
BOOST_LOG(error) << "vkQueueSubmit failed: " << res;