From 4d4837b84e70518cc99a02e545986e0343de3714 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 14 Jun 2023 12:00:23 -0500 Subject: [PATCH] vo_dmabuf_wayland: use a minimum of 15 buffers vo_dmabuf_wayland has a pool of wl_buffers that it cycles through when drawing frame. There needs to be at least some minimum number otherwise a flickering artifact occurs where old frames are mistakenly repeated. When using display-resample and other similar modes, it seems more buffers are required (more drawing happens so it makes sense) and the current minimum of 8 isn't good enough. Let's just bump this to 15. It's also a random ad hoc number, but as far as I know there's not really a way to predict how many buffers a random video may need. From testing, it works fine and overall 15 is still a tiny amount of objects to create considering the lifetime of a video, so we'll just go with this. --- 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 0a691d466e..1536d6a0c9 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -49,7 +49,7 @@ // We need at least enough buffers to avoid a // flickering artifact in certain formats. -#define WL_BUFFERS_WANTED 8 +#define WL_BUFFERS_WANTED 15 enum hwdec_type { HWDEC_NONE,