[Asterisk-code-review] res_rtp_asterisk: Don't produce transport-cc if no packets. (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Thu Feb 6 04:56:43 CST 2020
Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13756 )
Change subject: res_rtp_asterisk: Don't produce transport-cc if no packets.
......................................................................
res_rtp_asterisk: Don't produce transport-cc if no packets.
The code assumed that when the transport-cc feedback
function was called at least one packet will have been
received. In practice this isn't always true, so now
we just reschedule the sending and do nothing.
Change-Id: Iabe7b358704da446fc3b0596b847bff8b8a0da6a
---
M res/res_rtp_asterisk.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Joshua Colp: Approved for Submit
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 916a616..b4528f1 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -6667,6 +6667,12 @@
ao2_lock(instance);
+ /* If no packets have been received then do nothing */
+ if (!AST_VECTOR_SIZE(&rtp->transport_wide_cc.packet_statistics)) {
+ ao2_unlock(instance);
+ return 1000;
+ }
+
rtcpheader = (unsigned char *)bdata;
/* The first packet in the vector acts as our base sequence number and reference time */
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13756
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iabe7b358704da446fc3b0596b847bff8b8a0da6a
Gerrit-Change-Number: 13756
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200206/2b4e8628/attachment-0001.html>
More information about the asterisk-code-review
mailing list