From 9458367a507c7e170da324b8b386fb1c1f8cf455 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 25 Jan 2024 15:12:25 +0100 Subject: [PATCH] module-rtp: Fix framecount vs ptime check We should use framecount instead of impl->psamples. --- src/modules/module-rtp/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-rtp/stream.c b/src/modules/module-rtp/stream.c index 1062a5be1..3014087a9 100644 --- a/src/modules/module-rtp/stream.c +++ b/src/modules/module-rtp/stream.c @@ -431,7 +431,7 @@ struct rtp_stream *rtp_stream_new(struct pw_core *core, pw_properties_set(props, "rtp.ptime", spa_dtoa(tmp, sizeof(tmp), impl->psamples * 1000.0 / impl->rate)); - } else if (fabs((impl->psamples * 1000.0 / impl->rate) - ptime) > 0.1) { + } else if (fabs((framecount * 1000.0 / impl->rate) - ptime) > 0.1) { impl->psamples = ptime * impl->rate / 1000; pw_log_warn("rtp.ptime doesn't match rtp.framecount. Choosing rtp.ptime"); }