Index: webrtc/modules/audio_coding/acm2/acm_receiver.cc |
diff --git a/webrtc/modules/audio_coding/acm2/acm_receiver.cc b/webrtc/modules/audio_coding/acm2/acm_receiver.cc |
index 5649f07b2bc46efdeab6b8150b56d055588000b1..925e99c5d6381868f0bca60f36cf6af4e04ad705 100644 |
--- a/webrtc/modules/audio_coding/acm2/acm_receiver.cc |
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver.cc |
@@ -196,9 +196,10 @@ int AcmReceiver::GetAudio(int desired_freq_hz, AudioFrame* audio_frame) { |
// |GetPlayoutTimestamp|, which is the timestamp of the last sample of |
// |audio_frame|. |
// TODO(henrik.lundin) Move setting of audio_frame->timestamp_ inside NetEq. |
- uint32_t playout_timestamp = 0; |
- if (GetPlayoutTimestamp(&playout_timestamp)) { |
- audio_frame->timestamp_ = playout_timestamp - |
+ rtc::Optional<uint32_t> playout_timestamp = GetPlayoutTimestamp(); |
+ if (playout_timestamp) { |
+ audio_frame->timestamp_ = |
+ *playout_timestamp - |
minyue-webrtc
2016/04/04 15:53:50
"*playout_timestamp -" may be moved to follow afte
hlundin-webrtc
2016/04/04 21:02:54
Done. The extra line break is what git cl format g
|
static_cast<uint32_t>(audio_frame->samples_per_channel_); |
} else { |
// Remain 0 until we have a valid |playout_timestamp|. |
@@ -318,8 +319,8 @@ int AcmReceiver::RemoveCodec(uint8_t payload_type) { |
return 0; |
} |
-bool AcmReceiver::GetPlayoutTimestamp(uint32_t* timestamp) { |
- return neteq_->GetPlayoutTimestamp(timestamp); |
+rtc::Optional<uint32_t> AcmReceiver::GetPlayoutTimestamp() { |
+ return neteq_->GetPlayoutTimestamp(); |
} |
int AcmReceiver::LastAudioCodec(CodecInst* codec) const { |