Make num_encoded_channels_ atomic
Ensures that the value read by the audio thread is well-defined. Bug: b/176104610 Change-Id: I15d1901522be79703b3dc188fbe03c752be09a60 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212442 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33503}
This commit is contained in:
parent
049e6113a8
commit
c780605f6f
@ -11,6 +11,7 @@
|
||||
#include "media/engine/webrtc_voice_engine.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -1167,7 +1168,7 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
|
||||
// TODO(webrtc:11717): Remove this once audio_network_adaptor in AudioOptions
|
||||
// has been removed.
|
||||
absl::optional<std::string> audio_network_adaptor_config_from_options_;
|
||||
int num_encoded_channels_ = -1;
|
||||
std::atomic<int> num_encoded_channels_{-1};
|
||||
};
|
||||
|
||||
class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user