Also provide sample rate when registering decoders

This replaces the old practice of looking up the sample rate in a
table, which won't work when we add support for external decoders.

COAUTHOR=henrik.lundin@webrtc.org
BUG=4474
R=jmarusic@webrtc.org, minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/54469004

Cr-Commit-Position: refs/heads/master@{#9276}
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index 784174f..b299e88 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -204,7 +204,8 @@
 
 int NetEqImpl::RegisterExternalDecoder(AudioDecoder* decoder,
                                        enum NetEqDecoder codec,
-                                       uint8_t rtp_payload_type) {
+                                       uint8_t rtp_payload_type,
+                                       int sample_rate_hz) {
   CriticalSectionScoped lock(crit_sect_.get());
   LOG_API2(static_cast<int>(rtp_payload_type), codec);
   if (!decoder) {
@@ -212,7 +213,6 @@
     assert(false);
     return kFail;
   }
-  const int sample_rate_hz = CodecSampleRateHz(codec);
   int ret = decoder_database_->InsertExternal(rtp_payload_type, codec,
                                               sample_rate_hz, decoder);
   if (ret != DecoderDatabase::kOK) {