mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -04:00
netjack2: handle sync_wait errors
netjack2_driver_sync_wait can return an negative value on error, don't do any processing in that case instead of wrapping around the negative value into a huge unsigned int and breaking things..
This commit is contained in:
parent
3d414960c2
commit
739e2d1107
1 changed files with 2 additions and 2 deletions
|
|
@ -676,11 +676,11 @@ on_data_io(void *data, int fd, uint32_t mask)
|
|||
}
|
||||
if (mask & SPA_IO_IN) {
|
||||
bool source_running, sink_running;
|
||||
uint32_t nframes;
|
||||
int32_t nframes;
|
||||
uint64_t nsec;
|
||||
|
||||
nframes = netjack2_driver_sync_wait(&impl->peer);
|
||||
if (nframes == 0)
|
||||
if (nframes <= 0)
|
||||
return;
|
||||
|
||||
nsec = get_time_nsec(impl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue