mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
waylandsink/wlwindow: take into account the video aspect ratio when determining the size of the surface
This commit is contained in:
parent
bda600ed92
commit
04b0e54838
1 changed files with 4 additions and 3 deletions
|
@ -124,8 +124,8 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, GstVideoInfo * video_info)
|
|||
wl_compositor_create_surface (display->compositor));
|
||||
|
||||
gst_wl_window_set_video_info (window, video_info);
|
||||
gst_wl_window_set_render_rectangle (window, 0, 0, video_info->width,
|
||||
video_info->height);
|
||||
gst_wl_window_set_render_rectangle (window, 0, 0, window->video_width,
|
||||
window->video_height);
|
||||
|
||||
window->shell_surface = wl_shell_get_shell_surface (display->shell,
|
||||
window->surface);
|
||||
|
@ -211,7 +211,8 @@ gst_wl_window_set_video_info (GstWlWindow * window, GstVideoInfo * info)
|
|||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
window->video_width = info->width;
|
||||
window->video_width =
|
||||
gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
|
||||
window->video_height = info->height;
|
||||
|
||||
if (window->render_rectangle.w != 0)
|
||||
|
|
Loading…
Reference in a new issue