summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-04 16:05:32 -0500
committerDudemanguy <random342@airmail.cc>2023-10-04 16:21:47 -0500
commit8641cbaab6144d87bf7db5ab26ef95b6791c9149 (patch)
tree758e872fd197eabba596236625738c1c6d1a61bd
parentec80981c79f4cf350b48bb31679f8c6492977f3e (diff)
downloadmpv-8641cbaab6144d87bf7db5ab26ef95b6791c9149.tar.bz2
mpv-8641cbaab6144d87bf7db5ab26ef95b6791c9149.tar.xz
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.
-rw-r--r--video/out/vo_dmabuf_wayland.c5
1 files changed, 4 insertions, 1 deletions
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);