[Asterisk-code-review] Changed app amd for ASTERISK-28143 (asterisk[16])

Abhay Gupta asteriskteam at digium.com
Mon Nov 26 05:22:30 CST 2018


Abhay Gupta has uploaded this change for review. ( https://gerrit.asterisk.org/10707


Change subject: Changed app_amd for ASTERISK-28143
......................................................................

Changed app_amd for ASTERISK-28143

Change-Id: Ia4fe35be6bd9683bc1ae01b884d7a544c128d3b6
---
M apps/app_amd.c
1 file changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/07/10707/1

diff --git a/apps/app_amd.c b/apps/app_amd.c
index 3f805bb..e0c7559 100644
--- a/apps/app_amd.c
+++ b/apps/app_amd.c
@@ -282,7 +282,9 @@
 		/* Figure out how long we waited */
 		if (res > 0) {
 			ms = 2 * maxWaitTimeForFrame - res;
-		}
+		} else {
+			ms = 2 * maxWaitTimeForFrame;
+		}		
 
 		/* If we fail to read in a frame, that means they hung up */
 		if (!(f = ast_read(chan))) {
@@ -293,7 +295,7 @@
 			break;
 		}
 
-		if (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_CNG) {
+		if (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_CNG || f->frametype == AST_FRAME_NULL) {
 			/* Figure out how long the frame is in milliseconds */
 			if (f->frametype == AST_FRAME_VOICE) {
 				framelength = (ast_codec_samples_count(f) / DEFAULT_SAMPLES_PER_MS);

-- 
To view, visit https://gerrit.asterisk.org/10707
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4fe35be6bd9683bc1ae01b884d7a544c128d3b6
Gerrit-Change-Number: 10707
Gerrit-PatchSet: 1
Gerrit-Owner: Abhay Gupta <abhay at avissol.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181126/17612c4d/attachment.html>


More information about the asterisk-code-review mailing list