From 8c1d79815d53f925bfa493096ee9a8a01aa88d37 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 14 Apr 2025 09:34:24 -0400 Subject: [PATCH] MT#55283 convert t38_gateway to int64_t Change-Id: If2d32a943402c70565c60240d77e3932289c4e95 --- daemon/t38.c | 4 ++-- include/t38.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/t38.c b/daemon/t38.c index c6e8d174d..c901e1f23 100644 --- a/daemon/t38.c +++ b/daemon/t38.c @@ -288,7 +288,7 @@ static bool t38_pcm_player(struct media_player *mp) { tg->pts += num; // handle fill-in - if (timeval_diff(timeval_from_us(rtpe_now), tg->last_rx_ts) > 30000) { + if (rtpe_now - tg->last_rx_ts > 30000) { ilog(LOG_DEBUG, "Adding T.38 fill-in samples"); t38_gateway_rx_fillin(tg->gw, 80); } @@ -525,7 +525,7 @@ int t38_gateway_input_samples(struct t38_gateway *tg, int16_t amp[], int len) { ilog(LOG_WARN | LOG_FLAG_LIMIT, "%i PCM samples were not processed by the T.38 gateway", left); - tg->last_rx_ts = timeval_from_us(rtpe_now); + tg->last_rx_ts = rtpe_now; mutex_unlock(&tg->lock); diff --git a/include/t38.h b/include/t38.h index a92e8c32f..33507f47f 100644 --- a/include/t38.h +++ b/include/t38.h @@ -66,7 +66,7 @@ struct t38_gateway { unsigned long long pts; // to handle PCM fill-in - struct timeval last_rx_ts; + int64_t last_rx_ts; }; void t38_init(void);