mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Don't just blindly mmap the buffer but only when the data pointer is NULL. If it was mapped already by the peer or the adapter or the buffer allocation, we don't want to mmap it again and override the buffer data pointer. Also mmap with the permissions on the data. There is not much point in limiting the permissions for an input port (to read only). We could do this but then we would not be allowed to modify the existing data pointer. The problem is that when the stream mmaps the data as READ only and set the data pointer, if it is then handed to the mixer, it would assume it is mapped with the permissions and then segfault when it tries to write to the memory. It's just better to only mmap when the data is NULL. |
||
|---|---|---|
| .. | ||
| daemon | ||
| examples | ||
| gst | ||
| modules | ||
| pipewire | ||
| tests | ||
| tools | ||
| meson.build | ||