From fe9508f6ba39f7606e07a6b9267b9430f1227da4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 23 Jan 2019 13:29:51 +0100 Subject: [PATCH] rtp: initialize hooks properly before starting --- lib/nodes/rtp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nodes/rtp.c b/lib/nodes/rtp.c index 4374af802..8158b9e46 100644 --- a/lib/nodes/rtp.c +++ b/lib/nodes/rtp.c @@ -87,6 +87,8 @@ static int rtp_aimd(struct node *n, double loss_frac) else rate = r->aimd.last_rate * r->aimd.b; + debug(5, "Set rate limiting for node %s to %f", node_name(n), rate); + r->aimd.last_rate = rate; ret = rtp_set_rate(n, rate); @@ -335,6 +337,8 @@ int rtp_start(struct node *n) if (ret) return ret; + rtp_set_rate(n, r->aimd.last_rate); + vlist_push(&n->out.hooks, r->rtcp.throttle_hook); /* Initialize RTP socket */