mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46: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/4278>
This commit is contained in:
parent
96a46e31c7
commit
58d1ab4618
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 ==
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue