From 4699ebaa266ddfc2aad341a089c2fddbd87ba7b2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 24 Jun 2017 00:36:54 +0200 Subject: l1sap: if lchan is in loopback, don't accept incoming RTP When the lchan is in loopback mode, we loop back all uplink blocks into downlink blocks. We do not processs any RTP frames for that lchan anymore. Rather, we discard those RTP frames to avoid mixing looped-back samples with those received from remote. Change-Id: I29ef4963e9c491c94c413cbc10436a2388c04d9b --- src/common/l1sap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common') diff --git a/src/common/l1sap.c b/src/common/l1sap.c index d7e3fb3c..0ab84e54 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1168,6 +1168,11 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl, struct msgb *msg; struct osmo_phsap_prim *l1sap; + /* if we're in loopback mode, we don't accept frames from the + * RTP socket anymore */ + if (lchan->loopback) + return; + msg = l1sap_msgb_alloc(rtp_pl_len); if (!msg) return; -- cgit v1.2.3