0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02: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;
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);