Index: webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h |
diff --git a/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h b/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h |
index 7dca1fda25994eca3a2e6ae4954ecf751e24fb5f..4de4e26273f98d3fa077c286eb008d185711f6cb 100644 |
--- a/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h |
+++ b/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h |
@@ -93,10 +93,17 @@ class AudioEncoderMutableOpus |
bool SetApplication(Application application) override; |
bool SetMaxPlaybackRate(int frequency_hz) override; |
AudioEncoderOpus::ApplicationMode application() const { |
+ CriticalSectionScoped cs(encoder_lock_.get()); |
return encoder()->application(); |
} |
- double packet_loss_rate() const { return encoder()->packet_loss_rate(); } |
- bool dtx_enabled() const { return encoder()->dtx_enabled(); } |
+ double packet_loss_rate() const { |
+ CriticalSectionScoped cs(encoder_lock_.get()); |
+ return encoder()->packet_loss_rate(); |
+ } |
+ bool dtx_enabled() const { |
+ CriticalSectionScoped cs(encoder_lock_.get()); |
+ return encoder()->dtx_enabled(); |
+ } |
}; |
} // namespace webrtc |