mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
bluez5: handle no data written to sco socket
If socket write results to EAGAIN/EWOULDBLOCK or rx data starts late, spa_bt_sco_io_write may return 0, and we should give up and skip ahead (and not loop in RT thread with very small timeout).
This commit is contained in:
parent
762e549027
commit
cb10d87bb8
1 changed files with 3 additions and 0 deletions
|
|
@ -458,6 +458,9 @@ static void flush_data(struct impl *this)
|
|||
if (written < 0) {
|
||||
spa_log_warn(this->log, "sco-sink: write failure: %d", written);
|
||||
goto stop;
|
||||
} else if (written == 0) {
|
||||
/* EAGAIN or similar, just skip ahead */
|
||||
written = SPA_MIN(port->write_buffer_size, (uint32_t)48);
|
||||
}
|
||||
|
||||
processed = written;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue