Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: webrtc/voice_engine/channel.h

Issue 2710363003: Fix TSAN race in webrtc::voe::Channel (Closed)
Patch Set: EXCLUSIVE_LOCKS_REQUIRED used (and moved TODO to right function, whoops) Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/rtcstats_integrationtest.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.h
diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h
index 2be86be5aa5af91c58e54d71533762236cb0c256..e4e819c76f8c7f24f0a7a01904895d1827ddd381 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -416,7 +416,8 @@ class Channel
RTPExtensionType type,
unsigned char id);
- void UpdateOverheadForEncoder();
+ void UpdateOverheadForEncoder()
+ EXCLUSIVE_LOCKS_REQUIRED(overhead_per_packet_lock_);
int GetRtpTimestampRateHz() const;
int64_t GetRTT(bool allow_associate_channel) const;
@@ -497,8 +498,9 @@ class Channel
uint32_t _lastLocalTimeStamp;
int8_t _lastPayloadType;
bool _includeAudioLevelIndication;
- size_t transport_overhead_per_packet_;
- size_t rtp_overhead_per_packet_;
+ size_t transport_overhead_per_packet_ GUARDED_BY(overhead_per_packet_lock_);
+ size_t rtp_overhead_per_packet_ GUARDED_BY(overhead_per_packet_lock_);
+ rtc::CriticalSection overhead_per_packet_lock_;
// VoENetwork
AudioFrame::SpeechType _outputSpeechType;
// VoEVideoSync
« no previous file with comments | « webrtc/pc/rtcstats_integrationtest.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698