mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
raop: Discard data upon getting EAGAIN on a socket
This patch discards audio data when a socket returns EAGAIN. This was made based on a suggestion by karlstav (https://github.com/karlstav), and is supposed to solve Issue #32. (https://github.com/hfujita/pulseaudio-raop2/issues/32)
This commit is contained in:
parent
3e26f2d15e
commit
d7721032ea
1 changed files with 1 additions and 2 deletions
|
|
@ -471,8 +471,7 @@ static ssize_t send_udp_audio_packet(pa_raop_client *c, pa_memchunk *block, size
|
|||
written = pa_write(c->udp_sfd, buffer, packet->length, NULL);
|
||||
if (written < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) {
|
||||
pa_log_debug("Discarding UDP (audio, seq=%d) packet due to EAGAIN (%s)", c->seq, pa_cstrerror(errno));
|
||||
pa_memblock_release(packet->memblock);
|
||||
return (ssize_t) packet->length;
|
||||
written = packet->length;
|
||||
}
|
||||
|
||||
pa_memblock_release(packet->memblock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue