From f4587ea434505d565dcb37c966fd085a5305bc6f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 17 Mar 2026 13:53:23 +0100 Subject: [PATCH] modules: improve debug in RTP --- src/modules/module-raop-sink.c | 2 +- src/modules/module-rtp/audio.c | 2 +- src/modules/module-rtp/stream.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/module-raop-sink.c b/src/modules/module-raop-sink.c index f75da48a8..5e25b3089 100644 --- a/src/modules/module-raop-sink.c +++ b/src/modules/module-raop-sink.c @@ -346,7 +346,7 @@ static int send_udp_sync_packet(struct impl *impl, uint32_t rtptime, unsigned in res = sendmsg(impl->control_fd, &msg, MSG_NOSIGNAL); if (res < 0) { res = -errno; - pw_log_warn("error sending control packet: %d", res); + pw_log_warn("error sending control packet: %d (%m)", res); } pw_log_debug("raop control sync: first:%d latency:%u now:%"PRIx64" rtptime:%u", diff --git a/src/modules/module-rtp/audio.c b/src/modules/module-rtp/audio.c index d20e9a37c..27c4b218e 100644 --- a/src/modules/module-rtp/audio.c +++ b/src/modules/module-rtp/audio.c @@ -556,7 +556,7 @@ static void rtp_audio_flush_packets(struct impl *impl, uint32_t num_packets, uin ((uint64_t)timestamp * stride) % impl->actual_max_buffer_size, &iov[1], tosend * stride); - pw_log_trace("sending %d packet:%d ts_offset:%d timestamp:%u (%f s)", + pw_log_trace_fp("sending %d packet:%d ts_offset:%d timestamp:%u (%f s)", tosend, num_packets, impl->ts_offset, timestamp, (double)timestamp * impl->io_position->clock.rate.num / impl->io_position->clock.rate.denom); diff --git a/src/modules/module-rtp/stream.c b/src/modules/module-rtp/stream.c index d69b16524..5ca41eb12 100644 --- a/src/modules/module-rtp/stream.c +++ b/src/modules/module-rtp/stream.c @@ -426,7 +426,7 @@ static int stream_stop(struct impl *impl) * because a stop involves closing the connection. If the timer is still * running, it needs an open connection for sending out remaining packets. */ if (!timer_running) { - int res; + int res = 0; pw_log_info("closing connection as part of stopping the stream"); rtp_stream_emit_close_connection(impl, &res); if (res > 0) {