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

Unified Diff: media/cast/audio_receiver/audio_decoder.cc

Issue 74133002: Cast: Removed unnecessary ref counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 7 years, 1 month 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 | « media/cast/audio_receiver/audio_decoder.h ('k') | media/cast/audio_receiver/audio_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_receiver/audio_decoder.cc
diff --git a/media/cast/audio_receiver/audio_decoder.cc b/media/cast/audio_receiver/audio_decoder.cc
index b140788fe04887c406a6b05095420f516dac56c1..1417221a38edcebbe2dac05969c0fe4425c7dae1 100644
--- a/media/cast/audio_receiver/audio_decoder.cc
+++ b/media/cast/audio_receiver/audio_decoder.cc
@@ -52,7 +52,7 @@ bool AudioDecoder::GetRawAudioFrame(int number_of_10ms_blocks,
int desired_frequency,
PcmAudioFrame* audio_frame,
uint32* rtp_timestamp) {
- if (!have_received_packets_) return false;
+ if (!base::subtle::NoBarrier_Load(&have_received_packets_)) return false;
Alpha Left Google 2013/11/15 19:40:39 We very rarely use atomicops. What is the reason t
pwestin 2013/11/15 19:48:06 I was looking for other options but did not find a
audio_frame->samples.clear();
@@ -92,7 +92,7 @@ void AudioDecoder::IncomingParsedRtpPacket(const uint8* payload_data,
DCHECK_LE(payload_size, kIpPacketSize);
audio_decoder_->IncomingPacket(payload_data, static_cast<int32>(payload_size),
rtp_header.webrtc);
- have_received_packets_ = true;
+ base::subtle::NoBarrier_Store(&have_received_packets_, true);
}
} // namespace cast
« no previous file with comments | « media/cast/audio_receiver/audio_decoder.h ('k') | media/cast/audio_receiver/audio_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698