RTP_Emulation: Fix calculation of timer + timestamp increment

Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88
This commit is contained in:
Harald Welte 2017-12-24 21:30:48 +01:00
parent 8a4d3954b6
commit 46a38f1669
1 changed files with 2 additions and 2 deletions

View File

@ -89,14 +89,14 @@ private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_
RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp}));
/* increment sequence + timestamp for next transmit */
g_tx_next_seq := g_tx_next_seq + 1;
g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz mod (1000 mod g_tx_duration_ms));
g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz / (1000 / g_tx_duration_ms));
}
function f_main() runs on RTP_Emulation_CT
{
var Result res;
timer T_transmit := 1000.0/int2float(g_tx_duration_ms);
timer T_transmit := int2float(g_tx_duration_ms)/1000.0;
var RTP_RecvFrom rx_rtp;
var template RTP_RecvFrom tr := {
connId := ?,