Skip to content

Commit

Permalink
Merge 1f0ea2f into 4f18d96
Browse files Browse the repository at this point in the history
  • Loading branch information
babolivier committed Feb 19, 2021
2 parents 4f18d96 + 1f0ea2f commit a641650
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
* [Tarrence van As](https://github.com/tarrencev)
* [Maxim Oransky](https://github.com/sdfsdhgjkbmnmxc)
* [Graham King](https://github.com/grahamking/)
* [Brendan Abolivier](https://github.com/babolivier)

### License
MIT License - see [LICENSE](LICENSE) for full text
4 changes: 3 additions & 1 deletion unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,11 @@ func unmarshalBandwidth(value string) (*Bandwidth, error) {
experimental := strings.HasPrefix(parts[0], "X-")
if experimental {
parts[0] = strings.TrimPrefix(parts[0], "X-")
} else if !anyOf(parts[0], "CT", "AS") {
} else if !anyOf(parts[0], "CT", "AS", "TIAS", "RS", "RR") {
// Set according to currently registered with IANA
// https://tools.ietf.org/html/rfc4566#section-5.8
// https://tools.ietf.org/html/rfc3890#section-6.2
// https://tools.ietf.org/html/rfc3556#section-2
return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, parts[0])
}

Expand Down
5 changes: 4 additions & 1 deletion unmarshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ const (

MediaBandwidthSDP = MediaNameSDP +
"b=X-YZ:128\r\n" +
"b=AS:12345\r\n"
"b=AS:12345\r\n" +
"b=TIAS:12345\r\n" +
"b=RS:12345\r\n" +
"b=RR:12345\r\n"

MediaEncryptionKeySDP = MediaNameSDP +
"k=prompt\r\n"
Expand Down

0 comments on commit a641650

Please sign in to comment.