From 69f3c7073314c76f1730dad2040e1f7f18be5c09 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 18 Nov 2023 13:59:41 -0600 Subject: hwdec_vulkan: use VK_NULL_HANDLE when counting the number of images Otherwise you can get "error: comparison between pointer and integer" while compiling in some cases. --- video/out/hwdec/hwdec_vulkan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/out/hwdec/hwdec_vulkan.c') diff --git a/video/out/hwdec/hwdec_vulkan.c b/video/out/hwdec/hwdec_vulkan.c index cd9b43698c..5f7354dd8e 100644 --- a/video/out/hwdec/hwdec_vulkan.c +++ b/video/out/hwdec/hwdec_vulkan.c @@ -187,7 +187,7 @@ static void mapper_unmap(struct ra_hwdec_mapper *mapper) AVVkFrame *vkf = p->vkf; int num_images; - for (num_images = 0; (vkf->img[num_images] != NULL); num_images++); + for (num_images = 0; (vkf->img[num_images] != VK_NULL_HANDLE); num_images++); for (int i = 0; (p->tex[i] != NULL); i++) { pl_tex *tex = &p->tex[i]; @@ -247,7 +247,7 @@ static int mapper_map(struct ra_hwdec_mapper *mapper) mp_image_set_size(&raw_layout, hwfc->width, hwfc->height); int num_images; - for (num_images = 0; (vkf->img[num_images] != NULL); num_images++); + for (num_images = 0; (vkf->img[num_images] != VK_NULL_HANDLE); num_images++); const VkFormat *vk_fmt = av_vkfmt_from_pixfmt(hwfc->sw_format); vkfc->lock_frame(hwfc, vkf); -- cgit v1.2.3