summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-07-01 20:36:22 -0500
committerDudemanguy <random342@airmail.cc>2023-07-12 19:19:54 +0000
commita890d7be2a940475e8d5dffd5eee1288383a9c31 (patch)
treecaa0892f6df56fce472afcb51a6553b1c53357a6 /video
parentdc06dec1eed14a48c8563f237b745a2dabaed81b (diff)
downloadmpv-a890d7be2a940475e8d5dffd5eee1288383a9c31.tar.bz2
mpv-a890d7be2a940475e8d5dffd5eee1288383a9c31.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_dmabuf_wayland.c6
1 files changed, 2 insertions, 4 deletions
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);
}