aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_transcode.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-02 21:56:26 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-22 12:41:48 +0200
commite52ca9aad1cc0e1d8f3233852bb83f3e6367fa6a (patch)
treeccaf66dab2577ea16bc55d3993952f636f925c30 /openbsc/src/libmgcp/mgcp_transcode.c
parenta7992e0389d2fc8d56612b6b2972abf63fc26e05 (diff)
mgcp: Warn when the buffer is being reset due a wrong seq number
When the sample buffer is being dropped write a warning so we can see how often this event occurs.
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_transcode.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_transcode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_transcode.c b/openbsc/src/libmgcp/mgcp_transcode.c
index b76c5d9ac..a5f71faf6 100644
--- a/openbsc/src/libmgcp/mgcp_transcode.c
+++ b/openbsc/src/libmgcp/mgcp_transcode.c
@@ -486,15 +486,18 @@ int mgcp_transcoding_process_rtp(struct mgcp_endpoint *endp,
int32_t delta = ts_no - state->next_time;
/* TODO: check sequence? reordering? packet loss? */
- if (delta > state->sample_cnt)
+ if (delta > state->sample_cnt) {
/* There is a time gap between the last packet
* and the current one. Just discard the
* partial data that is left in the buffer.
* TODO: This can be improved by adding silence
* instead if the delta is small enough.
*/
+ LOGP(DMGCP, LOGL_NOTICE,
+ "0x%x dropping sample buffer due delta=%d sample_cnt=%d\n",
+ ENDPOINT_NUMBER(endp), delta, state->sample_cnt);
state->sample_cnt = 0;
- else if (delta < 0) {
+ } else if (delta < 0) {
LOGP(DMGCP, LOGL_NOTICE,
"RTP time jumps backwards, delta = %d, "
"discarding buffered samples\n",