From 0d7e20534f0828c6245ee4e64881628fa9ea1ffb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 7 Oct 2022 13:05:17 +0200 Subject: [PATCH] module-rtp: half buffer-time for node latency Spend half of the allowed latency on buffering and the other half on the node-latency. --- src/modules/module-rtp-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-rtp-source.c b/src/modules/module-rtp-source.c index 0bbbd1e41..fa8024979 100644 --- a/src/modules/module-rtp-source.c +++ b/src/modules/module-rtp-source.c @@ -556,7 +556,7 @@ static int session_new(struct impl *impl, struct sdp_info *info) pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%d", info->info.rate); pw_properties_setf(props, PW_KEY_NODE_LATENCY, "%d/%d", - session->target_buffer / info->stride, info->info.rate); + session->target_buffer / (2 * info->stride), info->info.rate); pw_properties_set(props, "rtp.origin", info->origin); pw_properties_setf(props, "rtp.payload", "%u", info->payload); if (info->session[0]) {