| Message ID | 20260323201015.4480-1-gianfranco.mariotti94@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 8147eca1..14ea98eb 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -506,6 +506,7 @@ int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParam /* Generate the output render framebuffer as render to texture */ egl_.createOutputDMABufTexture2D(*eglImageBayerOut_, out_fd); + utils::scope_exit outImageGuard([&] { egl_.destroyDMABufTexture(*eglImageBayerOut_); }); setShaderVariableValues(params); glViewport(0, 0, width_, height_);
Destroy the EGL image associated with the output DMA-BUF texture after processing the frame. Without this change memory can be seen building up while running a gstreamer pipeline using GPUISP, and on end of available memory the stream freezes and the error message `eglCreateImageKHR fail` is reported repeatedly. Signed-off-by: Gianfranco Mariotti <gianfranco.mariotti94@gmail.com> --- Changes in v2: - use utils::scope_exit to teardown src/libcamera/software_isp/debayer_egl.cpp | 1 + 1 file changed, 1 insertion(+)