[PATCH] osmo-bts[master]: DTX: fix 1st RTP packet drop

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Tue Oct 11 13:47:43 UTC 2016


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1027

to look at the new patch set (#2).

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
---
M include/osmo-bts/rsl.h
M src/common/l1sap.c
M src/common/rsl.c
3 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/1027/2

diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index 093e9cb..4311ffd 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -11,6 +11,8 @@
 	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 943bdfe..04cc800 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -72,7 +72,7 @@
 
 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 493ff3b..0f16f7d 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1621,6 +1621,7 @@
 		}
 		/* 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) {

-- 
To view, visit https://gerrit.osmocom.org/1027
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list