]> 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:54:57 +0000 (10:54 -0500)
commit006ee94580327a4cbed8a5c3cbe5bb58f884d1fd
tree85317c301d6889eb65173f4a580c415f802ee4de
parente3d290c957b37bbbf0f739fdad9a906281a8d36d
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