summaryrefslogtreecommitdiffstats
path: root/video/out/vo_dmabuf_wayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_dmabuf_wayland.c')
-rw-r--r--video/out/vo_dmabuf_wayland.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c
index 35a4dac464..d18ebc7d29 100644
--- a/video/out/vo_dmabuf_wayland.c
+++ b/video/out/vo_dmabuf_wayland.c
@@ -203,7 +203,7 @@ static void vaapi_dmabuf_importer(struct buffer *buf, struct mp_image *src,
}
buf->drm_format = desc.layers[layer_no].drm_format;
if (!ra_compatible_format(p->ctx->ra, buf->drm_format, desc.objects[0].drm_format_modifier)) {
- MP_VERBOSE(vo, "%s(%016lx) is not supported.\n",
+ MP_VERBOSE(vo, "%s(%016" PRIx64 ") is not supported.\n",
mp_tag_str(buf->drm_format), desc.objects[0].drm_format_modifier);
buf->drm_format = 0;
goto done;
@@ -494,9 +494,9 @@ static void set_viewport_source(struct vo *vo, struct mp_rect src)
return;
if (!mp_rect_equals(&p->src, &src)) {
- wp_viewport_set_source(wl->video_viewport, src.x0 << 8,
- src.y0 << 8, mp_rect_w(src) << 8,
- mp_rect_h(src) << 8);
+ wp_viewport_set_source(wl->video_viewport, wl_fixed_from_int(src.x0),
+ wl_fixed_from_int(src.y0), wl_fixed_from_int(mp_rect_w(src)),
+ wl_fixed_from_int(mp_rect_h(src)));
p->src = src;
}
}
@@ -537,10 +537,10 @@ static void resize(struct vo *vo)
vo_get_src_dst_rects(vo, &src, &dst, &p->screen_osd_res);
wp_viewport_set_destination(wl->video_viewport, lround(mp_rect_w(dst) / wl->scaling),
lround(mp_rect_h(dst) / wl->scaling));
- wl_subsurface_set_position(wl->video_subsurface, dst.x0, dst.y0);
+ wl_subsurface_set_position(wl->video_subsurface, lround(dst.x0 / wl->scaling), lround(dst.y0 / wl->scaling));
wp_viewport_set_destination(wl->osd_viewport, lround(vo->dwidth / wl->scaling),
lround(vo->dheight / wl->scaling));
- wl_subsurface_set_position(wl->osd_subsurface, 0 - dst.x0, 0 - dst.y0);
+ wl_subsurface_set_position(wl->osd_subsurface, lround((0 - dst.x0) / wl->scaling), lround((0 - dst.y0) / wl->scaling));
set_viewport_source(vo, src);
}
@@ -685,7 +685,7 @@ static int reconfig(struct vo *vo, struct mp_image *img)
}
if (!ra_compatible_format(p->ctx->ra, p->drm_format, p->drm_modifier)) {
- MP_ERR(vo, "Format '%s' with modifier '(%016lx)' is not supported by"
+ MP_ERR(vo, "Format '%s' with modifier '(%016" PRIx64 ")' is not supported by"
" the compositor.\n", mp_tag_str(p->drm_format), p->drm_modifier);
return VO_ERROR;
}
@@ -759,7 +759,7 @@ static int preinit(struct vo *vo)
wl_list_init(&p->buffer_list);
wl_list_init(&p->osd_buffer_list);
if (!p->ctx)
- goto err;
+ goto err;
assert(p->ctx->ra);