diff options
author | Dudemanguy <random342@airmail.cc> | 2023-11-18 13:59:41 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-11-18 20:46:11 +0000 |
commit | 69f3c7073314c76f1730dad2040e1f7f18be5c09 (patch) | |
tree | 726247ccc95a0566ce091d8a4f24fd50124a45be /video/out/hwdec/hwdec_vulkan.c | |
parent | cf27152991109adacf484a80d7df18d84c250249 (diff) | |
download | mpv-69f3c7073314c76f1730dad2040e1f7f18be5c09.tar.bz2 mpv-69f3c7073314c76f1730dad2040e1f7f18be5c09.tar.xz |
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.
Diffstat (limited to 'video/out/hwdec/hwdec_vulkan.c')
-rw-r--r-- | video/out/hwdec/hwdec_vulkan.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |