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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 1861303002: NetEq::GetPlayoutTimestamp returns empty during CNG (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@neteq-set-audio-frame-ts
Patch Set: Consolidate the test code Created 4 years, 8 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
Index: webrtc/modules/audio_coding/neteq/neteq_impl.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index 40a031421eb96e2bcfed865408ca2c7b8dea9555..db37e716d66dde966a4cac42f10dd47166c4f42c 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -403,9 +403,11 @@ void NetEqImpl::DisableVad() {
rtc::Optional<uint32_t> NetEqImpl::GetPlayoutTimestamp() const {
rtc::CritScope lock(&crit_sect_);
- if (first_packet_) {
+ if (first_packet_ || last_mode_ == kModeRfc3389Cng ||
+ last_mode_ == kModeCodecInternalCng) {
// We don't have a valid RTP timestamp until we have decoded our first
- // RTP packet.
+ // RTP packet. Also, the RTP timestamp is not accurate while playing CNG,
+ // which is indicated by returning an empty value.
return rtc::Optional<uint32_t>();
}
return rtc::Optional<uint32_t>(

Powered by Google App Engine
This is Rietveld 408576698