Skip to content

Commit 81920b5

Browse files
ColinKinlochslouken
authored andcommitted
testffmpeg: avutil queue family version check
The `AVVulkanDeviceQueueFamily` struct was introduced by libavutil 59.34.100
1 parent 8f04e4a commit 81920b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/testffmpeg_vulkan.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -679,15 +679,15 @@ void SetupVulkanRenderProperties(VulkanVideoContext *context, SDL_PropertiesID p
679679
SDL_SetNumberProperty(props, SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER, context->graphicsQueueFamilyIndex);
680680
}
681681

682-
#if LIBAVUTIL_VERSION_MAJOR >= 59
682+
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(59, 34, 100)
683683
static void AddQueueFamily(AVVulkanDeviceContext *ctx, int idx, int num, VkQueueFlagBits flags)
684684
{
685685
AVVulkanDeviceQueueFamily *entry = &ctx->qf[ctx->nb_qf++];
686686
entry->idx = idx;
687687
entry->num = num;
688688
entry->flags = flags;
689689
}
690-
#endif /* LIBAVUTIL_VERSION_MAJOR */
690+
#endif /* LIBAVUTIL_VERSION_INT */
691691

692692
void SetupVulkanDeviceContextData(VulkanVideoContext *context, AVVulkanDeviceContext *ctx)
693693
{
@@ -700,7 +700,7 @@ void SetupVulkanDeviceContextData(VulkanVideoContext *context, AVVulkanDeviceCon
700700
ctx->nb_enabled_inst_extensions = context->instanceExtensionsCount;
701701
ctx->enabled_dev_extensions = context->deviceExtensions;
702702
ctx->nb_enabled_dev_extensions = context->deviceExtensionsCount;
703-
#if LIBAVUTIL_VERSION_MAJOR >= 59
703+
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(59, 34, 100)
704704
AddQueueFamily(ctx, context->graphicsQueueFamilyIndex, context->graphicsQueueCount, VK_QUEUE_GRAPHICS_BIT);
705705
AddQueueFamily(ctx, context->transferQueueFamilyIndex, context->transferQueueCount, VK_QUEUE_TRANSFER_BIT);
706706
AddQueueFamily(ctx, context->computeQueueFamilyIndex, context->computeQueueCount, VK_QUEUE_COMPUTE_BIT);
@@ -716,7 +716,7 @@ void SetupVulkanDeviceContextData(VulkanVideoContext *context, AVVulkanDeviceCon
716716
ctx->nb_encode_queues = 0;
717717
ctx->queue_family_decode_index = context->decodeQueueFamilyIndex;
718718
ctx->nb_decode_queues = context->decodeQueueCount;
719-
#endif /* LIBAVUTIL_VERSION_MAJOR */
719+
#endif /* LIBAVUTIL_VERSION_INT */
720720
}
721721

722722
static int CreateCommandBuffers(VulkanVideoContext *context, SDL_Renderer *renderer)

0 commit comments

Comments
 (0)