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

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

Issue 1408773005: Remove ACMCodecDB::CodecFreq (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@rac-static
Patch Set: 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_codec_database.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/acm_receiver.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc b/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
index b8e8b9d4bc7fe5cb8c401b4c5a8afc412f5abcb6..34726ccb204b6f0b91f4f2736509743b463f55f4 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
@@ -178,7 +178,10 @@ int AcmReceiver::InsertPacket(const WebRtcRTPHeader& rtp_header,
<< " is not registered.";
return -1;
}
- const int sample_rate_hz = ACMCodecDB::CodecFreq(decoder->acm_codec_id);
+ const int sample_rate_hz = [&decoder] {
+ const auto ci = RentACodec::CodecIdFromIndex(decoder->acm_codec_id);
+ return ci ? RentACodec::CodecInstById(*ci)->plfreq : -1;
+ }();
receive_timestamp = NowInTimestamp(sample_rate_hz);
// If this is a CNG while the audio codec is not mono, skip pushing in
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698