mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
sco-source: initialize read mtu and read chunks of its size
The mtu value returned by the kernel seems to be incorrect, we use the hardcoded value of 48 for now (like bluezalsa)
This commit is contained in:
parent
15a4019e45
commit
551844c0ef
1 changed files with 10 additions and 1 deletions
|
|
@ -337,7 +337,7 @@ static void sco_on_ready_read(struct spa_source *source)
|
|||
datas = port->current_buffer->buf->datas;
|
||||
|
||||
/* read */
|
||||
size_read = read_data(this, (uint8_t *)datas[0].data + port->ready_offset, datas[0].maxsize);
|
||||
size_read = read_data(this, (uint8_t *)datas[0].data + port->ready_offset, this->read_mtu);
|
||||
if (size_read < 0) {
|
||||
spa_log_error(this->log, "failed to read data");
|
||||
goto stop;
|
||||
|
|
@ -1065,6 +1065,15 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
&this->transport_listener, &transport_events, this);
|
||||
this->sock_fd = -1;
|
||||
|
||||
/* TODO: For now, we always use an MTU size of 48 bytes like bluezalsa
|
||||
* because the MTU size returned by the kernel is incorrect (or our
|
||||
* interpretation of it) */
|
||||
#if 0
|
||||
this->read_mtu = this->transport->read_mtu;
|
||||
#else
|
||||
this->read_mtu = 48;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue