mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
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:
parent
73b16af81c
commit
bdbae4e700
1 changed files with 6 additions and 2 deletions
|
@ -1103,8 +1103,12 @@ _build_render_buffer_cmd (GstVulkanSwapper * swapper, guint32 swap_idx,
|
||||||
g_assert (priv->surface_location.h ==
|
g_assert (priv->surface_location.h ==
|
||||||
gst_vulkan_image_memory_get_height (swap_img));
|
gst_vulkan_image_memory_get_height (swap_img));
|
||||||
|
|
||||||
gst_video_sink_center_rect (src, priv->surface_location, &priv->display_rect,
|
if (priv->force_aspect_ratio) {
|
||||||
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 "
|
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,
|
"src %ux%u dst %ux%u", priv->display_rect.w, priv->display_rect.h,
|
||||||
|
|
Loading…
Reference in a new issue