[FFmpeg-cvslog] hwcontext_vulkan: fix inverted condition when exporting images to drm_prime

Lynne git at videolan.org
Mon May 11 01:23:52 EEST 2020


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Sun May 10 21:30:15 2020 +0100| [7c080dc190ac1d85de1ca873347d0ac8855985e0] | committer: Lynne

hwcontext_vulkan: fix inverted condition when exporting images to drm_prime

Calling vkGetImageSubresourceLayout is only legal for linear and drm images.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c080dc190ac1d85de1ca873347d0ac8855985e0
---

 libavutil/hwcontext_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index b62d0a6c6c..085187c175 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2327,7 +2327,7 @@ static int vulkan_map_to_drm(AVHWFramesContext *hwfc, AVFrame *dst,
 
         drm_desc->layers[i].planes[0].object_index = FFMIN(i, drm_desc->nb_objects - 1);
 
-        if (f->tiling != VK_IMAGE_TILING_OPTIMAL)
+        if (f->tiling == VK_IMAGE_TILING_OPTIMAL)
             continue;
 
         vkGetImageSubresourceLayout(hwctx->act_dev, f->img[i], &sub, &layout);



More information about the ffmpeg-cvslog mailing list