Skip to content

Commit

Permalink
RendererDRMPRIMEGLES: Fix leak of EGL fences
Browse files Browse the repository at this point in the history
When running on wayland in a desktop window, kodi will crash with
'Too many open files' after a minute of so of video playback.

I've tracked it down the EGL fences. Render gets called more often than ReleaseBuffer
(I'm seeing two Render calls per ReleaseBuffer call).

As we allocate a fence in Render and free in ReleaseBuffer this leaks.

It's safe to call DestroyFence on a non-created fence so use that to stop the leak
  • Loading branch information
popcornmix committed May 11, 2023
1 parent 7979126 commit b637e5e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ void CRendererDRMPRIMEGLES::Render(unsigned int flags, int index)

glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);

buf.fence->DestroyFence();
buf.fence->CreateFence();
}

Expand Down

0 comments on commit b637e5e

Please sign in to comment.