From a890d7be2a940475e8d5dffd5eee1288383a9c31 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 1 Jul 2023 20:36:22 -0500 Subject: vo_dmabuf_wayland: stop guarding viewport interfaces It's entirely pointless. Not having viewport is already a fatal error for this VO as it cannot possibly work without that protocol. Just drop all these redundant if's. --- video/out/vo_dmabuf_wayland.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'video/out') diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index ee60f4a2da..2f9e41f1b0 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -328,15 +328,13 @@ static void resize(struct vo *vo) vo->opts->pan_x = 0; vo->opts->pan_y = 0; vo_get_src_dst_rects(vo, &src, &dst, &osd); - if (wl->viewport) - wp_viewport_set_destination(wl->viewport, 2 * dst.x0 + mp_rect_w(dst), 2 * dst.y0 + mp_rect_h(dst)); + wp_viewport_set_destination(wl->viewport, 2 * dst.x0 + mp_rect_w(dst), 2 * dst.y0 + mp_rect_h(dst)); //now we restore pan for video viewport calculation vo->opts->pan_x = vo_opts->pan_x; vo->opts->pan_y = vo_opts->pan_y; vo_get_src_dst_rects(vo, &src, &dst, &osd); - if (wl->video_viewport) - wp_viewport_set_destination(wl->video_viewport, mp_rect_w(dst), mp_rect_h(dst)); + wp_viewport_set_destination(wl->video_viewport, mp_rect_w(dst), mp_rect_h(dst)); wl_subsurface_set_position(wl->video_subsurface, dst.x0, dst.y0); set_viewport_source(vo, src); } -- cgit v1.2.3