[Asterisk-code-review] main/audiohook.c: Fix bug in audiohook lead to out of sync ... (asterisk[13])
Joshua Colp
asteriskteam at digium.com
Fri Mar 17 07:04:25 CDT 2017
Joshua Colp has uploaded a new change for review. ( https://gerrit.asterisk.org/5243 )
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/43/5243/1
diff --git a/main/audiohook.c b/main/audiohook.c
index f5812e7..0a2f6c2 100644
--- a/main/audiohook.c
+++ b/main/audiohook.c
@@ -186,7 +186,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/5243
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4d890fb8fc1636a7188502bab35f555685aea22
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Aaron An <anjb at ti-net.com.cn>
More information about the asterisk-code-review
mailing list