mgcp: Patch and Count _after_ the transcoding
When going from a ptime of 10 to 20 a lot of alignment errors
are reported. In fact the alignment check should be done before
and after the transcoding. As this is not possible right now
only do it _after_ the patching.
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 5629e84..7dcf3f3 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -582,13 +582,13 @@
int cont;
int nbytes = 0;
int len = rc;
- mgcp_patch_and_count(endp, rtp_state, rtp_end, addr, buf, len);
do {
cont = endp->cfg->rtp_processing_cb(endp, rtp_end,
buf, &len, RTP_BUF_SIZE);
if (cont < 0)
break;
+ mgcp_patch_and_count(endp, rtp_state, rtp_end, addr, buf, len);
forward_data(rtp_end->rtp.fd, &endp->taps[tap_idx],
buf, len);
rc = mgcp_udp_send(rtp_end->rtp.fd,