diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-12-24 21:30:48 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-12-25 00:00:58 +0100 |
commit | 46a38f1669c8174f8bb92482787d74bae1113041 (patch) | |
tree | a847c83bee3cc1b8c55341c348fb259a43182591 | |
parent | 8a4d3954b6e734937d6bacd7542f889d2da60748 (diff) |
RTP_Emulation: Fix calculation of timer + timestamp increment
Change-Id: I3ba0d31ad571f42721f208a40f7dcbd8fb2c6e88
-rw-r--r-- | library/RTP_Emulation.ttcn | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn index e4a30294..10cf6837 100644 --- a/library/RTP_Emulation.ttcn +++ b/library/RTP_Emulation.ttcn @@ -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 := ?, |