diff options
author | Aaron An <anjb@ti-net.com.cn> | 2017-03-15 12:49:12 +0800 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2017-03-20 13:02:27 -0600 |
commit | d5b480afcae343a7222b1b2b1279f8877c42925d (patch) | |
tree | f4904d11153c24cb20f96e87da577a7a4c346f41 /main/audiohook.c | |
parent | 9613391868db2651376825345f5392a9e126b491 (diff) |
audiohook.c: Lost RTP packets lead to out-of-sync MixMonitor.
Fixed a bug in function "ast_audiohook_write_frame" that checked the
variable other_factory_samples and only flushed the factories, so they
would be in sync, when other_factory_samples > 0. When there is not any
rtp incoming the variable other_factory_samples will be 0, and although
the result of "our_factory_ms - other_factory_ms" may be very large,
this led to the record file not syncing.
ASTERISK-26875 #close
Reported-by: Aaron An
Tested-by: Aaron An
Change-Id: Ia4d890fb8fc1636a7188502bab35f555685aea22
Diffstat (limited to 'main/audiohook.c')
-rw-r--r-- | main/audiohook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/audiohook.c b/main/audiohook.c index f5812e701..0a2f6c2f7 100644 --- a/main/audiohook.c +++ b/main/audiohook.c @@ -186,7 +186,7 @@ int ast_audiohook_write_frame(struct ast_audiohook *audiohook, enum ast_audiohoo 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); |