diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc index 25a4756e6..62d6676f0 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc @@ -770,6 +770,7 @@ void RTCPReceiver::HandleSDESChunk(RTCPUtility::RTCPParserV2& rtcpParser) { cnameInfo->name[RTCP_CNAME_SIZE - 1] = 0; strncpy(cnameInfo->name, rtcpPacket.CName.CName, RTCP_CNAME_SIZE - 1); + CriticalSectionScoped lock(_criticalSectionFeedbacks); if (stats_callback_ != NULL) { stats_callback_->CNameChanged(rtcpPacket.CName.CName, rtcpPacket.CName.SenderSSRC); diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h index a52e8101d..46d10f754 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h @@ -274,7 +274,7 @@ protected: // delivered RTP packet to the remote side. int64_t _lastIncreasedSequenceNumberMs; - RtcpStatisticsCallback* stats_callback_; + RtcpStatisticsCallback* stats_callback_ GUARDED_BY(_criticalSectionFeedbacks); RtcpPacketTypeCounter packet_type_counter_;