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

Unified Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc

Issue 1425233003: Hide ACMCodecDB::database_ behind accessors (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@rac-static
Patch Set: rebase Created 5 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 | « webrtc/modules/audio_coding/main/acm2/acm_receiver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
index 8f2d6f2a8266405e2ae53a63104a59f0763a360f..aea64c9133bdc4bf596ae438f0e9a43476288022 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
@@ -528,10 +528,9 @@ int AudioCodingModuleImpl::ReceiveFrequency() const {
CriticalSectionScoped lock(acm_crit_sect_.get());
- int codec_id = receiver_.last_audio_codec_id();
-
- return codec_id < 0 ? receiver_.current_sample_rate_hz() :
- ACMCodecDB::database_[codec_id].plfreq;
+ auto codec_id = RentACodec::CodecIdFromIndex(receiver_.last_audio_codec_id());
+ return codec_id ? RentACodec::CodecInstById(*codec_id)->plfreq
+ : receiver_.current_sample_rate_hz();
}
// Get current playout frequency.
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/acm_receiver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698