screenshare: destroy bo on pwStreamRemoveBuffer

This commit is contained in:
Vaxry 2023-11-20 18:50:48 +00:00
parent 8d3538e113
commit 716da5e0f3

View file

@ -932,6 +932,9 @@ static void pwStreamRemoveBuffer(void* data, pw_buffer* buffer) {
if (PSTREAM->currentPWBuffer == PBUFFER) if (PSTREAM->currentPWBuffer == PBUFFER)
PSTREAM->currentPWBuffer = nullptr; PSTREAM->currentPWBuffer = nullptr;
if (PBUFFER->isDMABUF)
gbm_bo_destroy(PBUFFER->bo);
wl_buffer_destroy(PBUFFER->wlBuffer); wl_buffer_destroy(PBUFFER->wlBuffer);
for (int plane = 0; plane < PBUFFER->planeCount; plane++) { for (int plane = 0; plane < PBUFFER->planeCount; plane++) {
close(PBUFFER->fd[plane]); close(PBUFFER->fd[plane]);