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

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

Issue 2021063002: NetEq decoder database: Don't keep track of sample rate for builtin decoders (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@decoder-samp-rate
Patch Set: explicit capture Created 4 years, 7 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 87d12f51f1502263bc0750268060ac69bf014f61..b8e8c71d3411a3a14f72589897786f078505edce 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -761,9 +761,10 @@ int NetEqImpl::InsertPacketInternal(const WebRtcRTPHeader& rtp_header,
const DecoderDatabase::DecoderInfo* decoder_info =
decoder_database_->GetDecoderInfo(payload_type);
assert(decoder_info);
- if (decoder_info->fs_hz != fs_hz_ ||
+ if (decoder_info->SampleRateHz() != fs_hz_ ||
channels != algorithm_buffer_->Channels()) {
- SetSampleRateAndChannels(decoder_info->fs_hz, channels);
+ SetSampleRateAndChannels(decoder_info->SampleRateHz(),
+ channels);
}
if (nack_enabled_) {
RTC_DCHECK(nack_);
@@ -1347,10 +1348,11 @@ int NetEqImpl::Decode(PacketList* packet_list, Operations* operation,
}
// If sampling rate or number of channels has changed, we need to make
// a reset.
- if (decoder_info->fs_hz != fs_hz_ ||
+ if (decoder_info->SampleRateHz() != fs_hz_ ||
decoder->Channels() != algorithm_buffer_->Channels()) {
// TODO(tlegrand): Add unittest to cover this event.
- SetSampleRateAndChannels(decoder_info->fs_hz, decoder->Channels());
+ SetSampleRateAndChannels(decoder_info->SampleRateHz(),
+ decoder->Channels());
}
sync_buffer_->set_end_timestamp(timestamp_);
playout_timestamp_ = timestamp_;

Powered by Google App Engine
This is Rietveld 408576698