audiohook.c: Lost RTP packets lead to out-of-sync MixMonitor.
authorAaron An <anjb@ti-net.com.cn>
Wed, 15 Mar 2017 04:49:12 +0000 (12:49 +0800)
committerKevin Harwell <kharwell@digium.com>
Mon, 20 Mar 2017 19:01:52 +0000 (13:01 -0600)
commit25016a74f8446137c1b92cb6bc33275d4d43a662
tree4251101e273c8773cdff67acce4e1d6737bcb097
parentc15232993247fe59a53a9a3f96c1d3e67298e47f
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
main/audiohook.c