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

Unified Diff: webrtc/api/webrtcsdp.cc

Issue 2609863003: Relax parsing of a=bundle-only with a nonzero port. (Closed)
Patch Set: Created 3 years, 12 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 | « no previous file | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsdp.cc
diff --git a/webrtc/api/webrtcsdp.cc b/webrtc/api/webrtcsdp.cc
index f18653dad9e805ab74512146006762e06396fc28..e5ee4167ee5e0b70d755d5bf3385df9232db9795 100644
--- a/webrtc/api/webrtcsdp.cc
+++ b/webrtc/api/webrtcsdp.cc
@@ -2372,14 +2372,17 @@ bool ParseMediaDescription(const std::string& message,
}
bool content_rejected = false;
+ // A port of 0 is not interpreted as a rejected m= section when it's
+ // used along with a=bundle-only.
if (bundle_only) {
- // A port of 0 is not interpreted as a rejected m= section when it's
- // used along with a=bundle-only.
if (!port_rejected) {
- return ParseFailed(
- "a=bundle-only",
- "a=bundle-only MUST only be used in combination with a 0 port.",
- error);
+ // Usage of bundle-only with a nonzero port is unspecified. So just
+ // ignore bundle-only if we see this.
+ bundle_only = false;
+ LOG(LS_WARNING)
+ << "a=bundle-only attribute observed with a nonzero "
+ << "port; this usage is unspecified so the attribute is being "
+ << "ignored.";
}
} else {
// If not using bundle-only, interpret port 0 in the normal way; the m=
« no previous file with comments | « no previous file | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698