aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Godin <Yves.Godin@nutaq.com>2016-10-06 16:03:18 +0200
committerHarald Welte <laforge@gnumonks.org>2016-10-11 15:50:29 +0000
commitc1b86d80d1354c37c72bf6aad1f6230d54930e19 (patch)
tree270022d70f8aca67fd74c3562588fa72537d461d
parent8b39ff8bcfba2bb4444fb375bfedb24900ae4f52 (diff)
DTX: fix 1st RTP packet drop
Use "impossible" dummy value to initialize last_fn to prevent dropping of 1st RTP frame due to timestamp jump. Fixes: OS#1803 Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed
-rw-r--r--include/osmo-bts/rsl.h2
-rw-r--r--src/common/l1sap.c2
-rw-r--r--src/common/rsl.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index 093e9cb7..4311ffdc 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -11,6 +11,8 @@ enum {
LCHAN_REL_ACT_OML,
};
+#define LCHAN_FN_DUMMY 0xFFFFFFFF
+
int msgb_queue_flush(struct llist_head *list);
int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg);
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 943bdfe2..04cc8006 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -72,7 +72,7 @@ static int l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap);
static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn)
{
- if (last_fn) {
+ if (last_fn != LCHAN_FN_DUMMY) {
uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn),
samples_passed = GSM_MS_TO_SAMPLES(ms_passed);
/* round number of samples to the nearest multiple of
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 493ff3be..0f16f7d8 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1621,6 +1621,7 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
}
/* FIXME: select default value depending on speech_mode */
//if (!payload_type)
+ lchan->tch.last_fn = LCHAN_FN_DUMMY;
lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx,
OSMO_RTP_F_POLL);
if (!lchan->abis_ip.rtp_socket) {