| Index: webrtc/pc/mediasession.cc
|
| diff --git a/webrtc/pc/mediasession.cc b/webrtc/pc/mediasession.cc
|
| index 382cdbc44fde55aa251ff5b5f698d39e424be764..a9d1b95c22aee6aae9299315a9ecc05586242336 100644
|
| --- a/webrtc/pc/mediasession.cc
|
| +++ b/webrtc/pc/mediasession.cc
|
| @@ -56,13 +56,6 @@
|
| const char kMediaProtocolAvpf[] = "RTP/AVPF";
|
| // RFC5124
|
| const char kMediaProtocolDtlsSavpf[] = "UDP/TLS/RTP/SAVPF";
|
| -
|
| -// The accepted pattern for media protocol (JSEP Section 5.1.3)
|
| -const std::vector<std::string> kMediaProtocols = {"RTP/SAVPF", "RTP/SAVP",
|
| - "RTP/AVPF", "RTP/AVP"};
|
| -const std::vector<std::string> kMediaProtocolsDtls = {
|
| - "UDP/TLS/RTP/SAVPF", "UDP/TLS/RTP/SAVP", "TCP/TLS/RTP/SAVPF",
|
| - "TCP/TLS/RTP/SAVP"};
|
|
|
| // We always generate offers with "UDP/TLS/RTP/SAVPF" when using DTLS-SRTP,
|
| // but we tolerate "RTP/SAVPF" in offers we receive, for compatibility.
|
| @@ -1112,12 +1105,6 @@
|
| return true;
|
| }
|
|
|
| -static bool IsProtocolFound(const std::vector<std::string> protocols,
|
| - const std::string& protocol) {
|
| - return std::find(protocols.begin(), protocols.end(), protocol) !=
|
| - protocols.end();
|
| -}
|
| -
|
| static bool IsMediaProtocolSupported(MediaType type,
|
| const std::string& protocol,
|
| bool secure_transport) {
|
| @@ -1130,8 +1117,9 @@
|
|
|
| // Since not all applications serialize and deserialize the media protocol,
|
| // we will have to accept |protocol| to be empty.
|
| - return protocol.empty() || IsProtocolFound(kMediaProtocols, protocol) ||
|
| - (IsProtocolFound(kMediaProtocolsDtls, protocol) && secure_transport);
|
| + return protocol == kMediaProtocolAvpf || protocol.empty() ||
|
| + protocol == kMediaProtocolSavpf ||
|
| + (protocol == kMediaProtocolDtlsSavpf && secure_transport);
|
| }
|
|
|
| static void SetMediaProtocol(bool secure_transport,
|
|
|