summaryrefslogtreecommitdiff
path: root/ext/wayland/wlwindow.c
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-13 16:29:32 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-06-17 13:51:30 +0200
commit04b0e548383dd7a4ebbe3aad2b5f9ca21241877a (patch)
tree6be47f335fe3b7d754689472d8737b8233a6c1ee /ext/wayland/wlwindow.c
parentbda600ed92327444841e893d6899d2674dcbace2 (diff)
downloadgstreamer-plugins-bad-04b0e548383dd7a4ebbe3aad2b5f9ca21241877a.tar.gz
waylandsink/wlwindow: take into account the video aspect ratio when determining the size of the surface
Diffstat (limited to 'ext/wayland/wlwindow.c')
-rw-r--r--ext/wayland/wlwindow.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
index 8ecf9ea21..432613970 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)