From 4113956e016542cd707455ffb1572cd9be895537 Mon Sep 17 00:00:00 2001 From: Guangqing Chen Date: Fri, 25 Mar 2022 18:39:40 +0800 Subject: [PATCH] [core] fix CRcvBufferNew::m_iStartSeqNo was not sync in group --- srtcore/buffer_rcv.h | 2 ++ srtcore/core.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/srtcore/buffer_rcv.h b/srtcore/buffer_rcv.h index a5e113dfc..4a8e5b078 100644 --- a/srtcore/buffer_rcv.h +++ b/srtcore/buffer_rcv.h @@ -325,6 +325,8 @@ class CRcvBufferNew void setPeerRexmitFlag(bool flag) { m_bPeerRexmitFlag = flag; } + void applyGroupISN(int rcv_isn) { m_iStartSeqNo = rcv_isn; } + void applyGroupTime(const time_point& timebase, bool wrp, uint32_t delay, const duration& udrift); void applyGroupDrift(const time_point& timebase, bool wrp, const duration& udrift); diff --git a/srtcore/core.cpp b/srtcore/core.cpp index e9f333d3a..abab5ae6a 100644 --- a/srtcore/core.cpp +++ b/srtcore/core.cpp @@ -3330,6 +3330,11 @@ void srt::CUDT::synchronizeWithGroup(CUDTGroup* gp) << " (shift by " << CSeqNo::seqcmp(snd_isn, m_iSndLastAck) << ")"); setInitialRcvSeq(rcv_isn); setInitialSndSeq(snd_isn); +#if ENABLE_NEW_RCVBUFFER + enterCS(m_RecvLock); + m_pRcvBuffer->applyGroupISN(rcv_isn); + leaveCS(m_RecvLock); +#endif } else {