From 31af37f87762e5e548fa234b30f6248d8d6c19e4 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 26 Oct 2022 22:21:26 -0500 Subject: [PATCH] vo_dmabuf_wayland: load all hwdecs in preinit vo_gpu and vo_gpu_next typically load hwdec interops on demand and vo_dmabuf_wayland naively copied this logic. This is actually wrong however since draw_frame in the VO always inherently relies on hwdec being fully loaded. This can lead to a race condition during startup which happens with --force-window=immediate. Avoid this by simply always loading all the interops. In the case of vo_dmabuf_wayland, this is not really a big deal since there's only vaapi and drmprime to load. Also fixes #10791 (the other half). --- video/out/vo_dmabuf_wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index 4b4c1c06dd..eb658b43d7 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -339,7 +339,7 @@ static int preinit(struct vo *vo) .global = p->global, .ra = p->ctx->ra, }; - ra_hwdec_ctx_init(&p->hwdec_ctx, vo->hwdec_devs, NULL, false); + ra_hwdec_ctx_init(&p->hwdec_ctx, vo->hwdec_devs, NULL, true); return 0; err_out: