vulkanswapper: correctly handle force-aspect-ratio=false

It was simply ignored so actually handle it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4290>
This commit is contained in:
Matthew Waters 2023-03-27 16:28:04 +11:00 committed by GStreamer Marge Bot
parent 73b16af81c
commit bdbae4e700

View file

@ -1103,8 +1103,12 @@ _build_render_buffer_cmd (GstVulkanSwapper * swapper, guint32 swap_idx,
g_assert (priv->surface_location.h ==
gst_vulkan_image_memory_get_height (swap_img));
gst_video_sink_center_rect (src, priv->surface_location, &priv->display_rect,
priv->force_aspect_ratio);
if (priv->force_aspect_ratio) {
gst_video_sink_center_rect (src, priv->surface_location,
&priv->display_rect, priv->force_aspect_ratio);
} else {
priv->display_rect = priv->surface_location;
}
GST_TRACE_OBJECT (swapper, "rendering into result rectangle %ux%u+%u,%u "
"src %ux%u dst %ux%u", priv->display_rect.w, priv->display_rect.h,