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 5015b7e9fe21d1035461756d58a4e7b8e0494d6d..501e5672d1c8e02dd68fa95d243c1adfc70dd496 100644 |
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc |
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc |
@@ -212,6 +212,15 @@ int NetEqImpl::GetAudio(AudioFrame* audio_frame, bool* muted) { |
return kOK; |
} |
+void NetEqImpl::SetCodecs(const std::map<int, SdpAudioFormat>& codecs) { |
+ rtc::CritScope lock(&crit_sect_); |
+ const std::vector<int> changed_payload_types = |
+ decoder_database_->SetCodecs(codecs); |
+ for (const int pt : changed_payload_types) { |
+ packet_buffer_->DiscardPacketsWithPayloadType(pt); |
+ } |
+} |
+ |
int NetEqImpl::RegisterPayloadType(NetEqDecoder codec, |
const std::string& name, |
uint8_t rtp_payload_type) { |