aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-10-06 21:04:40 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-10-09 17:22:33 +0200
commit7b76f82b6e3e99f872356b45b25e2dc2e386a231 (patch)
tree1b32cd695be73b95d323fddcdd7a86030c1638ab /openbsc/src/libmgcp
parent05d481a42cb119c51773209528cc15d3d4584e79 (diff)
mgcp: Count the incoming data instead of the modified one
For jitter, transit and packet loss we should count the data that arrived and not the data we send towards the remote. This is changing the jitter timings to what they were before the re-factoring. For forced timing we might willingly add jumps in the sequence number but for jitter and packet loss we are more interested in the data that traveled through the wire/air.
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 9def94e41..37fc59aec 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -415,6 +415,8 @@ void mgcp_patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *sta
ssrc = ntohl(rtp_hdr->ssrc);
transit = arrival_time - timestamp;
+ mgcp_rtp_annex_count(endp, state, seq, transit, ssrc);
+
if (!state->initialized) {
state->initialized = 1;
state->in_stream.last_seq = seq - 1;
@@ -520,8 +522,6 @@ void mgcp_patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *sta
addr, seq, timestamp, "output",
&state->out_stream.last_tsdelta);
- mgcp_rtp_annex_count(endp, state, seq, transit, ssrc);
-
/* Save output values */
state->out_stream.last_seq = seq;
state->out_stream.last_timestamp = timestamp;