plugins/screencast: Avoid closing dmabuf fds twice
dmabuf fds are owned by the GraphicsBuffer, which will be destroyed when `m_dmabufDataForPwBuffer.remove(buffer);` is executed.
This commit is contained in:
parent
0897dbff75
commit
fb7dd07076
1 changed files with 0 additions and 4 deletions
|
@ -292,10 +292,6 @@ void ScreenCastStream::onStreamRemoveBuffer(pw_buffer *buffer)
|
||||||
if (spa_data && spa_data->type == SPA_DATA_MemFd) {
|
if (spa_data && spa_data->type == SPA_DATA_MemFd) {
|
||||||
munmap(spa_data->data, spa_data->maxsize);
|
munmap(spa_data->data, spa_data->maxsize);
|
||||||
close(spa_data->fd);
|
close(spa_data->fd);
|
||||||
} else if (spa_data && spa_data->type == SPA_DATA_DmaBuf) {
|
|
||||||
for (int i = 0, c = buffer->buffer->n_datas; i < c; ++i) {
|
|
||||||
close(buffer->buffer->datas[i].fd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue