osmo_ortp: Fix seqno reset to 0 upon ssrc_changed

It was spotted in an osmo-mgw instance receiving RTP from osmo-bts 1.2.3
that sometimes the seqno was reset to 0 (while tx_timestamp was kept
properly). This seems to be the only possible way osmo-bts can reset the
seqno to 0 (calling rtp_session_reset()), since osmo_rtp_socket_create
already sets it to other values and inside ortp rtp_session_reset() is
the only one setting it to 0.
If SSRC changes, we are fine resetting some Rx state, which is done by
calling rtp_session_resync. However, calling rtp_session_reset() is too
much, since it erases other stuff like Tx state, which sholdn't be
affected in this case, since we are still transmitting the same stream.

Related: OS#3104
Related: OS#3299
Related: SYS#5498
Fixes: 28eeb6bc93

Change-Id: Ic6006b4991c85413b009b70f8f3a6f97c41990ec
This commit is contained in:
Pau Espin 2021-07-20 14:29:37 +02:00
parent c5f1d4f9d3
commit 24e0217c2e
1 changed files with 2 additions and 2 deletions

View File

@ -142,8 +142,8 @@ static void ortp_sig_cb_ssrc(RtpSession *rs, void *data)
uint32_t ssrc = rtp_session_get_recv_ssrc(rs);
LOGP(DLMIB, LOGL_INFO,
"osmo-ortp(%d): ssrc_changed to 0x%08x, resetting\n", port, ssrc);
rtp_session_reset(rs);
"osmo-ortp(%d): ssrc_changed to 0x%08x, resyncing\n", port, ssrc);
rtp_session_resync(rs);
}
static void ortp_sig_cb_pt(RtpSession *rs, void *data)