[Asterisk-code-review] res/res rtp asterisk: smoother can cause wrong timestames if... (asterisk[13])
Torrey Searle
asteriskteam at digium.com
Mon Feb 25 09:44:45 CST 2019
Torrey Searle has uploaded this change for review. ( https://gerrit.asterisk.org/11038
Change subject: res/res_rtp_asterisk: smoother can cause wrong timestames if dtmf happen
......................................................................
res/res_rtp_asterisk: smoother can cause wrong timestames 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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/11038/1
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 8fc52a0..c5d557e 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -3566,6 +3566,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/11038
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaba3f7b428ebd72a4caa90e13b829ab4f088310f
Gerrit-Change-Number: 11038
Gerrit-PatchSet: 1
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190225/37a8d611/attachment-0001.html>
More information about the asterisk-code-review
mailing list