From 04b0e548383dd7a4ebbe3aad2b5f9ca21241877a Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 13 Jun 2014 16:29:32 +0200 Subject: [PATCH] waylandsink/wlwindow: take into account the video aspect ratio when determining the size of the surface --- ext/wayland/wlwindow.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c index 8ecf9ea213..432613970f 100644 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -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) -- 2.34.1