summaryrefslogtreecommitdiffstats
path: root/video/out/wldmabuf/ra_wldmabuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/wldmabuf/ra_wldmabuf.c')
-rw-r--r--video/out/wldmabuf/ra_wldmabuf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/video/out/wldmabuf/ra_wldmabuf.c b/video/out/wldmabuf/ra_wldmabuf.c
index eda2cc9fe8..a3499a25e9 100644
--- a/video/out/wldmabuf/ra_wldmabuf.c
+++ b/video/out/wldmabuf/ra_wldmabuf.c
@@ -34,12 +34,16 @@ bool ra_compatible_format(struct ra* ra, uint32_t drm_format, uint64_t modifier)
struct vo_wayland_state *wl = p->vo->wl;
const wayland_format *formats = wl->format_map;
- for (int i = 0; i < wl->format_size / sizeof(wayland_format); i++)
- {
+ for (int i = 0; i < wl->format_size / sizeof(wayland_format); i++) {
if (drm_format == formats[i].format && modifier == formats[i].modifier)
return true;
}
+ for (int i = 0; i < wl->drm_format_ct; i++) {
+ if (drm_format == wl->drm_formats[i])
+ return true;
+ }
+
return false;
}