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

Unified Diff: webrtc/pc/mediasession.cc

Issue 2397413002: - Filter data channel codecs based on codec name instead of payload type, which may have been remap… (Closed)
Patch Set: reviewer comments Created 4 years, 2 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
« no previous file with comments | « webrtc/media/sctp/sctpdataengine.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/mediasession.cc
diff --git a/webrtc/pc/mediasession.cc b/webrtc/pc/mediasession.cc
index bfb5692f0fd7868cd3f7755eb7b44e0664a47e7c..ebba9acbcbf5adfddabb45eb31fb00575936a85b 100644
--- a/webrtc/pc/mediasession.cc
+++ b/webrtc/pc/mediasession.cc
@@ -302,10 +302,11 @@ static void GetCurrentStreamParams(const SessionDescription* sdesc,
// Filters the data codecs for the data channel type.
void FilterDataCodecs(std::vector<DataCodec>* codecs, bool sctp) {
// Filter RTP codec for SCTP and vice versa.
- int codec_id = sctp ? kGoogleRtpDataCodecId : kGoogleSctpDataCodecId;
+ const char* codec_name =
+ sctp ? kGoogleRtpDataCodecName : kGoogleSctpDataCodecName;
for (std::vector<DataCodec>::iterator iter = codecs->begin();
iter != codecs->end();) {
- if (iter->id == codec_id) {
+ if (CodecNamesEq(iter->name, codec_name)) {
iter = codecs->erase(iter);
} else {
++iter;
« no previous file with comments | « webrtc/media/sctp/sctpdataengine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698