1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

rtp: fix calculation of loss fraction

This commit is contained in:
Steffen Vogel 2019-02-17 21:16:51 +01:00
parent aff3e56a5b
commit e91084bec9

View file

@ -94,7 +94,7 @@ static int rtp_aimd(struct node *n, double loss_frac)
if (!r->rtcp.enabled)
return -1;
if (loss_frac < 1e-3)
if (loss_frac < 0.01)
rate = r->aimd.last_rate + r->aimd.a;
else
rate = r->aimd.last_rate * r->aimd.b;
@ -333,7 +333,7 @@ static void rtcp_handler(const struct sa *src, struct rtcp_msg *msg, void *arg)
if (msg->hdr.count > 0) {
const struct rtcp_rr *rr = &msg->r.sr.rrv[0];
debug(5, "rtp: fraction lost = %d", rr->fraction);
rtp_aimd(n, rr->fraction);
rtp_aimd(n, (double) rr->fraction / 256);
}
else
warning("Received RTCP sender report with zero reception reports");