mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 06:35:57 +01:00
screencast: HACK set an arbitrary chunk size for dmabufs
Clients have wrongly used the chunk size to detect if a buffer was valid or not. Since dmabufs might not have a well defined buffer size we will set an arbitrary value until clients are patched.
This commit is contained in:
parent
0683f7ca7e
commit
852e1c95c7
1 changed files with 6 additions and 0 deletions
|
@ -233,6 +233,12 @@ static void pwr_handle_stream_add_buffer(void *data, struct pw_buffer *buffer) {
|
|||
d[0].flags = 0;
|
||||
d[0].fd = xdpw_buffer->fd;
|
||||
d[0].data = NULL;
|
||||
|
||||
// clients have implemented to check chunk->size if the buffer is valid instead
|
||||
// of using the flags. Until they are patched we should use some arbitrary value.
|
||||
if (xdpw_buffer->buffer_type == DMABUF && d[0].chunk->size == 0) {
|
||||
d[0].chunk->size = 9; // This was choosen by a fair d20.
|
||||
}
|
||||
}
|
||||
|
||||
static void pwr_handle_stream_remove_buffer(void *data, struct pw_buffer *buffer) {
|
||||
|
|
Loading…
Reference in a new issue