1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 01:47:38 +00:00

vo_dmabuf_wayland: free frame if the visibility check fails

Forgotten in 7b8a30fc81. Every other case
either is either a dummy frame (no allocated memory) or we manage it as
part of the usual wayland buffer release.
This commit is contained in:
Dudemanguy 2023-10-04 16:05:32 -05:00
parent ec80981c79
commit 8641cbaab6

View File

@ -591,8 +591,11 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
struct osd_buffer *osd_buf; struct osd_buffer *osd_buf;
double pts; double pts;
if (!vo_wayland_check_visible(vo)) if (!vo_wayland_check_visible(vo)) {
if (frame->current)
talloc_free(frame);
return; return;
}
if (p->destroy_buffers) if (p->destroy_buffers)
destroy_buffers(vo); destroy_buffers(vo);