Skip to content

Commit

Permalink
vo_dmabuf_wayland: free frame if the visibility check fails
Browse files Browse the repository at this point in the history
Forgotten in 7b8a30f. Every other case
either is either a dummy frame (no allocated memory) or we manage it as
part of the usual wayland buffer release.
  • Loading branch information
Dudemanguy committed Oct 4, 2023
1 parent ec80981 commit 8641cba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion video/out/vo_dmabuf_wayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8641cba

Please sign in to comment.