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.
This commit is contained in:
Dudemanguy 2023-11-18 13:59:41 -06:00
parent cf27152991
commit 69f3c70733
1 changed files with 2 additions and 2 deletions

View File

@ -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);