Fix data race for RTCPReceiver stats callback.
Annotates the callback which identifies the bug, then fixes it. R=stefan@webrtc.org BUG= Review URL: https://webrtc-codereview.appspot.com/40009004 Cr-Commit-Position: refs/heads/master@{#8390} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8390 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
8f605e8911
commit
a28a91d2f0
@ -770,6 +770,7 @@ void RTCPReceiver::HandleSDESChunk(RTCPUtility::RTCPParserV2& rtcpParser) {
|
|||||||
|
|
||||||
cnameInfo->name[RTCP_CNAME_SIZE - 1] = 0;
|
cnameInfo->name[RTCP_CNAME_SIZE - 1] = 0;
|
||||||
strncpy(cnameInfo->name, rtcpPacket.CName.CName, RTCP_CNAME_SIZE - 1);
|
strncpy(cnameInfo->name, rtcpPacket.CName.CName, RTCP_CNAME_SIZE - 1);
|
||||||
|
CriticalSectionScoped lock(_criticalSectionFeedbacks);
|
||||||
if (stats_callback_ != NULL) {
|
if (stats_callback_ != NULL) {
|
||||||
stats_callback_->CNameChanged(rtcpPacket.CName.CName,
|
stats_callback_->CNameChanged(rtcpPacket.CName.CName,
|
||||||
rtcpPacket.CName.SenderSSRC);
|
rtcpPacket.CName.SenderSSRC);
|
||||||
|
@ -274,7 +274,7 @@ protected:
|
|||||||
// delivered RTP packet to the remote side.
|
// delivered RTP packet to the remote side.
|
||||||
int64_t _lastIncreasedSequenceNumberMs;
|
int64_t _lastIncreasedSequenceNumberMs;
|
||||||
|
|
||||||
RtcpStatisticsCallback* stats_callback_;
|
RtcpStatisticsCallback* stats_callback_ GUARDED_BY(_criticalSectionFeedbacks);
|
||||||
|
|
||||||
RtcpPacketTypeCounter packet_type_counter_;
|
RtcpPacketTypeCounter packet_type_counter_;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user