screenshare: destroy bo on pwStreamRemoveBuffer

This commit is contained in:
Vaxry 2023-11-20 18:50:48 +00:00
parent 8d3538e113
commit 716da5e0f3
1 changed files with 5 additions and 2 deletions

View File

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