[Asterisk-code-review] main/audiohook.c: Fix bug in audiohook lead to out of sync ... (asterisk[master])

Aaron An asteriskteam at digium.com
Tue Mar 14 23:52:10 CDT 2017


Aaron An has uploaded a new change for review. ( https://gerrit.asterisk.org/5209 )

Change subject: main/audiohook.c:  Fix bug in audiohook lead to out of sync MixMonitor.
......................................................................

main/audiohook.c:  Fix bug in audiohook lead to out of sync MixMonitor.

MixMonitor out of sync due to the delayed rtp stream after SIP 183 with
SDP. In function ast_audiohook_write_frame, if other_factory_samples is
0, we never flush the factories although the result of
"our_factory_ms - other_factory_ms" may very large.

ASTERISK-26875 #close
Reported-by: Aaron An
Tested-by: AaronAn

Change-Id: Ia4d890fb8fc1636a7188502bab35f555685aea22
---
M main/audiohook.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/09/5209/1

diff --git a/main/audiohook.c b/main/audiohook.c
index 836ae04..986f11f 100644
--- a/main/audiohook.c
+++ b/main/audiohook.c
@@ -185,7 +185,7 @@
 	other_factory_samples = ast_slinfactory_available(other_factory);
 	other_factory_ms = other_factory_samples / (audiohook->hook_internal_samp_rate / 1000);
 
-	if (ast_test_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC) && other_factory_samples && (our_factory_ms - other_factory_ms > AST_AUDIOHOOK_SYNC_TOLERANCE)) {
+	if (ast_test_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC) && (our_factory_ms - other_factory_ms > AST_AUDIOHOOK_SYNC_TOLERANCE)) {
 		ast_debug(1, "Flushing audiohook %p so it remains in sync\n", audiohook);
 		ast_slinfactory_flush(factory);
 		ast_slinfactory_flush(other_factory);

-- 
To view, visit https://gerrit.asterisk.org/5209
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4d890fb8fc1636a7188502bab35f555685aea22
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Aaron An <anjb at ti-net.com.cn>



More information about the asterisk-code-review mailing list