diff --git a/unmarshal.go b/unmarshal.go index 3720d0d..9e90320 100644 --- a/unmarshal.go +++ b/unmarshal.go @@ -808,7 +808,7 @@ func unmarshalMediaDescription(l *lexer) (stateFn, error) { // https://tools.ietf.org/html/rfc4566#section-5.14 // https://tools.ietf.org/html/rfc4975#section-8.1 for _, proto := range strings.Split(field, "/") { - if !anyOf(proto, "UDP", "RTP", "AVP", "SAVP", "SAVPF", "TLS", "DTLS", "SCTP", "AVPF", "TCP", "MSRP", "BFCP", "UDT", "IX") { + if !anyOf(proto, "UDP", "RTP", "AVP", "SAVP", "SAVPF", "TLS", "DTLS", "SCTP", "AVPF", "TCP", "MSRP", "BFCP", "UDT", "IX", "MRCPv2") { return nil, fmt.Errorf("%w `%v`", errSDPInvalidNumericValue, field) } newMediaDesc.MediaName.Protos = append(newMediaDesc.MediaName.Protos, proto) diff --git a/unmarshal_test.go b/unmarshal_test.go index 46bbe77..8ce8195 100644 --- a/unmarshal_test.go +++ b/unmarshal_test.go @@ -169,6 +169,12 @@ const ( "a=ixmap:0 ping\r\n" + "a=ixmap:2 xccp\r\n" + MediaTCPMRCPv2 = TimingSDP + + "m=application 1544 TCP/MRCPv2 1\r\n" + + MediaTCPTLSMRCPv2 = TimingSDP + + "m=application 1544 TCP/TLS/MRCPv2 1\r\n" + CanonicalUnmarshalSDP = "v=0\r\n" + "o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5\r\n" + "s=SDP Seminar\r\n" + @@ -320,6 +326,14 @@ func TestRoundTrip(t *testing.T) { Name: "MediaCubeSDP", SDP: MediaCubeSDP, }, + { + Name: "MediaTCPMRCPv2", + SDP: MediaTCPMRCPv2, + }, + { + Name: "MediaTCPTLSMRCPv2", + SDP: MediaTCPTLSMRCPv2, + }, } { test := test t.Run(test.Name, func(t *testing.T) {