[vlc-devel] [PATCH] vout: vulkan: compatibility with newer libplacebo

Niklas Haas vlc at haasn.xyz
Sun May 24 20:04:20 CEST 2020


From: Niklas Haas <git at haasn.xyz>

This field changed from pl_rect2d to pl_rect2df. To maintain
compatibility with both versions, set the fields directly, allowing us
to avoid having to reference the type. (They have the same members)
---
 modules/video_output/vulkan/display.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/vulkan/display.c b/modules/video_output/vulkan/display.c
index 174627d67d..226165f283 100644
--- a/modules/video_output/vulkan/display.c
+++ b/modules/video_output/vulkan/display.c
@@ -225,12 +225,10 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
 
     struct pl_render_target target;
     pl_render_target_from_swapchain(&target, &frame);
-    target.dst_rect = (struct pl_rect2d) {
-        .x0 = sys->place.x,
-        .y0 = sys->place.y,
-        .x1 = sys->place.x + sys->place.width,
-        .y1 = sys->place.y + sys->place.height,
-    };
+    target.dst_rect.x0 = sys->place.x;
+    target.dst_rect.y0 = sys->place.y;
+    target.dst_rect.x1 = sys->place.x + sys->place.width;
+    target.dst_rect.y1 = sys->place.y + sys->place.height;
 
     // Override the target colorimetry only if the user requests it
     if (sys->target.primaries)
-- 
2.26.2



More information about the vlc-devel mailing list