Skip to content

Release fbo - #2212

Merged
pedroSG94 merged 3 commits into
masterfrom
release-fbo
Oct 9, 2026
Merged

pedroSG94 merged 3 commits into
masterfrom
release-fbo

Conversation

@pedroSG94

Copy link
Copy Markdown
Owner

No description provided.

x270880x and others added 3 commits October 6, 2026 00:21
initFBOLink() gives every added filter a framebuffer, a depth renderbuffer
and an RGBA texture the size of the stream. Nothing ever deletes them:
release() of each filter only deletes its program (object filters also
their content texture), and there is no glDeleteFramebuffers or
glDeleteRenderbuffers in the library. So every removeFilter and
clearFilters leaks one frame-size FBO until the EGL context is destroyed. Apps that change overlays during a stream run the
GPU out of memory.

MainRender now frees the FBO, the renderbuffer and the texture whenever it
drops a filter, after the filter's own release(), on the GL thread that
created them. The ids are reset to 0, so a second release does nothing and
a filter added again gets new ones.

setFilter keeps reusing the old filter's FBO for the new filter. The old
filter gets a new RenderHandler before release(), so it no longer shares
the ids with the filter that took its place.

removeFilter(filter) now releases the filter only if it was in the list,
so removing a filter twice can't delete ids that belong to something else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pedroSG94
pedroSG94 merged commit 82a9cb4 into master Oct 9, 2026
1 check passed
@pedroSG94
pedroSG94 deleted the release-fbo branch October 9, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants