From 8641cbaab6144d87bf7db5ab26ef95b6791c9149 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 4 Oct 2023 16:05:32 -0500 Subject: [PATCH] vo_dmabuf_wayland: free frame if the visibility check fails Forgotten in 7b8a30fc8132203bc93d35ac887682d2044ad5a9. Every other case either is either a dummy frame (no allocated memory) or we manage it as part of the usual wayland buffer release. --- video/out/vo_dmabuf_wayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index 4ba58781ab..a5d481a56a 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -591,8 +591,11 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) struct osd_buffer *osd_buf; double pts; - if (!vo_wayland_check_visible(vo)) + if (!vo_wayland_check_visible(vo)) { + if (frame->current) + talloc_free(frame); return; + } if (p->destroy_buffers) destroy_buffers(vo);