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); }