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

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

Issue 2355503002: Stopped using the NetEqDecoder enum internally in NetEq. (Closed)
Patch Set: A couple of fixes. Improved comments. Created 4 years, 3 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/timestamp_scaler.cc
diff --git a/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc b/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc
index 1f28639e435efcd9a94fb1813a5f3687f050e353..b7eeb4be3a28221d8b46a7c98d70505e3c51abfe 100644
--- a/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc
+++ b/webrtc/modules/audio_coding/neteq/timestamp_scaler.cc
@@ -45,9 +45,9 @@ uint32_t TimestampScaler::ToInternal(uint32_t external_timestamp,
if (!(info->IsComfortNoise() || info->IsDtmf())) {
// Do not change the timestamp scaling settings for DTMF or CNG.
numerator_ = info->SampleRateHz();
- if (info->codec_type == NetEqDecoder::kDecoderArbitrary) {
- // We have no format mapping for "arbitrary" external codecs, so we cannot
- // support timestamp scaling of them.
+ if (info->GetFormat().clockrate_hz == 0) {
+ // If the clockrate is invalid (i.e. with an old-style external codec)
+ // we cannot do any timestamp scaling.
kwiberg-webrtc 2016/09/22 12:23:48 Excellent.
denominator_ = numerator_;
} else {
denominator_ = info->GetFormat().clockrate_hz;

Powered by Google App Engine
This is Rietveld 408576698