summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-06-14 12:00:23 -0500
committerDudemanguy <random342@airmail.cc>2023-06-14 12:00:23 -0500
commit4d4837b84e70518cc99a02e545986e0343de3714 (patch)
tree20acfc267bee9120a6f9ae53fb25cdaa9e4b08bd /video/out
parentf1c9daa169d2b51a759997ee05af6b036324b4c5 (diff)
downloadmpv-4d4837b84e70518cc99a02e545986e0343de3714.tar.bz2
mpv-4d4837b84e70518cc99a02e545986e0343de3714.tar.xz
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.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo_dmabuf_wayland.c2
1 files changed, 1 insertions, 1 deletions
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,