mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
raop: Rework packet's store memory management
This patch switch the packet-buffer to use core memory pool instead of manually allocating the room required for storing TCP/UDP packets. Packets are now stored using pa_memchunk instead of internal struct. Quite a few malloc saved compare to previous design.
This commit is contained in:
parent
32a5b3047b
commit
750a677b43
4 changed files with 216 additions and 253 deletions
|
|
@ -333,7 +333,6 @@ static void thread_func(void *userdata) {
|
|||
unsigned int i, nbfds = 0;
|
||||
pa_usec_t now, estimated, intvl;
|
||||
uint64_t position;
|
||||
ssize_t written;
|
||||
size_t index;
|
||||
int ret;
|
||||
|
||||
|
|
@ -399,8 +398,7 @@ static void thread_func(void *userdata) {
|
|||
pa_assert(u->memchunk.length > 0);
|
||||
|
||||
index = u->memchunk.index;
|
||||
written = pa_raop_client_send_audio_packet(u->raop, &u->memchunk, offset);
|
||||
if (written < 0) {
|
||||
if (pa_raop_client_send_audio_packet(u->raop, &u->memchunk, offset) < 0) {
|
||||
if (errno == EINTR) {
|
||||
/* Just try again. */
|
||||
pa_log_debug("Failed to write data to FIFO (EINTR), retrying");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue