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

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

Issue 2686043006: WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (Closed)
Patch Set: Discard packets when updating payload type map Created 3 years, 9 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 786cb84aa3ed8beffb5d6d6bb9f7db8d74267afc..8dea7038ee55337fdf42ac8e3a6f8a1449c5809d 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) {

Powered by Google App Engine
This is Rietveld 408576698