summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-07-22 14:10:56 -0500
committerDudemanguy <random342@airmail.cc>2023-07-23 04:55:26 +0000
commit783e2bf1389bbc6ba836bd8b206e96c174528639 (patch)
tree746f15d83a3bd6ae27789bfaec31320c9f36d18b /video
parentca4192e2df7bcfdb9e18461f19e1bd2dd0ee3c7a (diff)
downloadmpv-783e2bf1389bbc6ba836bd8b206e96c174528639.tar.bz2
mpv-783e2bf1389bbc6ba836bd8b206e96c174528639.tar.xz
vo_dmabuf_wayland: correctly handle force-window
Since this works by mpctx giving us a dummy image, we can be reasonably be confident that when we receive a matching imgfmt with no underlying hw_subfmt that this is simply force window from the player. Just allow this to go through the usual wayland logic and skip the hwdec checking. When we get the real image later, it will still error out on the compositors that don't have proper support.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_dmabuf_wayland.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c
index a7c6206f98..a43b0fd180 100644
--- a/video/out/vo_dmabuf_wayland.c
+++ b/video/out/vo_dmabuf_wayland.c
@@ -648,6 +648,11 @@ static int reconfig(struct vo *vo, struct mp_image *img)
{
struct priv *p = vo->priv;
+ // If we have a supported format but no hw_subfmt, this
+ // is probably handle_force_window. Consider it valid.
+ if (is_supported_fmt(img->params.imgfmt) && img->params.hw_subfmt == IMGFMT_NONE)
+ goto done;
+
if (!drm_format_check(vo, img)) {
MP_ERR(vo, "Unable to get drm format from hardware decoding!\n");
return VO_ERROR;
@@ -659,6 +664,7 @@ static int reconfig(struct vo *vo, struct mp_image *img)
return VO_ERROR;
}
+done:
if (!vo_wayland_reconfig(vo))
return VO_ERROR;
@@ -806,7 +812,7 @@ static int preinit(struct vo *vo)
}
if (p->hwdec_type == HWDEC_NONE) {
- MP_ERR(vo, "No valid hardware decoding driver could be loaded!");
+ MP_ERR(vo, "No valid hardware decoding driver could be loaded!\n");
goto err;
}