[Asterisk-code-review] res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen (...asterisk[master])
Friendly Automation
asteriskteam at digium.com
Thu Feb 28 05:44:48 CST 2019
Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11043 )
Change subject: res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen
......................................................................
res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen
Delivery timeval in the smoother object will fall behind while a DTMF is
being generated. This can eventually lead to invalid rtp timestamps.
To prevent this from happening the smoother needs to be reset after every
DTMF to keep the timing up to date.
ASTERISK-28303 #close
Change-Id: Iaba3f7b428ebd72a4caa90e13b829ab4f088310f
---
M res/res_rtp_asterisk.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Sean Bright: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index c206497..84b2088 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -3957,6 +3957,12 @@
/* Oh and we can't forget to turn off the stuff that says we are sending DTMF */
rtp->lastts += calc_txstamp(rtp, NULL) * DTMF_SAMPLE_RATE_MS;
+
+ /* Reset the smoother as the delivery time stored in it is now out of date */
+ if (rtp->smoother) {
+ ast_smoother_free(rtp->smoother);
+ rtp->smoother = NULL;
+ }
cleanup:
rtp->sending_digit = 0;
rtp->send_digit = 0;
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11043
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iaba3f7b428ebd72a4caa90e13b829ab4f088310f
Gerrit-Change-Number: 11043
Gerrit-PatchSet: 1
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190228/5a6751fc/attachment.html>
More information about the asterisk-code-review
mailing list