From 974117f41a85bf515902c5853d61d36943f835fd Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 31 Dec 2024 15:23:30 -0500 Subject: [PATCH] module-rtp: Fix previous typo fix We want to track the difference between the PTP timestamp (now) and the last RTP send, not the synthesized next RTP timestamp (which will always be smoothly incrementing). --- src/modules/module-rtp/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-rtp/audio.c b/src/modules/module-rtp/audio.c index 1cf0f432a..adb17ecf3 100644 --- a/src/modules/module-rtp/audio.c +++ b/src/modules/module-rtp/audio.c @@ -452,9 +452,9 @@ static void ptp_sender_process(void *d, struct spa_io_position *position) /* If send is lagging by more than 2 or more quanta, reset */ if (!impl->refilling && impl->rtp_last_ts && - SPA_ABS((int32_t)rtp_timestamp - (int32_t)impl->rtp_last_ts) >= (int32_t)(2 * quantum)) { + SPA_ABS((int32_t)ptp_timestamp - (int32_t)impl->rtp_last_ts) >= (int32_t)(2 * quantum)) { pw_log_warn("expected %u - timestamp %u = %d >= 2 * %"PRIu64" quantum", rtp_timestamp, impl->rtp_last_ts, - (int)rtp_timestamp - (int)impl->rtp_last_ts, quantum); + (int)ptp_timestamp - (int)impl->rtp_last_ts, quantum); goto resync; }