]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_multicast: Use consistent timestamps when possible
authorSean Bright <sean.bright@gmail.com>
Tue, 6 Jun 2017 15:04:44 +0000 (11:04 -0400)
committerSean Bright <sean.bright@gmail.com>
Tue, 6 Jun 2017 15:55:04 +0000 (10:55 -0500)
commitb3ca24d216120d6f6fa1440c73331bb85592ddf1
tree99560ab3840a575b74815e998bf4ff92f1d5b41a
parent452e6315bb8be7578937de279aa1d906662faa20
res_rtp_multicast: Use consistent timestamps when possible

When a frame destined for a MulticastRTP channel does not have timing
information (such as when an 'originate' is done), we generate the RTP
timestamps ourselves without regard to the number of samples we are
about to send.

Instead, use the same method as res_rtp_asterisk and 'predict' a
timestamp given the number of samples. If the difference between the
timestamp that we generate and the one we predict is within a specific
threshold, use the predicted timestamp so that we end up with timestamps
that are consistent with the number of samples we are actually sending.

Change-Id: I2bf0db3541b1573043330421cbb114ff0f22ec1f
res/res_rtp_multicast.c