From b25263783d2abd266be71a31b2ed15e10e4795f0 Mon Sep 17 00:00:00 2001 From: Sektor van Skijlen Date: Wed, 18 Dec 2024 17:02:07 +0100 Subject: [PATCH] [core] Make field for bandwidth atomic to avoid thread clash (#3093). --- srtcore/congctl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srtcore/congctl.cpp b/srtcore/congctl.cpp index 85d4cda97..9bc43db8b 100644 --- a/srtcore/congctl.cpp +++ b/srtcore/congctl.cpp @@ -60,7 +60,7 @@ void SrtCongestion::Check() class LiveCC: public SrtCongestionControlBase { - int64_t m_llSndMaxBW; //Max bandwidth (bytes/sec) + srt::sync::atomic m_llSndMaxBW; //Max bandwidth (bytes/sec) srt::sync::atomic m_zSndAvgPayloadSize; //Average Payload Size of packets to xmit size_t m_zMaxPayloadSize; size_t m_zHeaderSize;