mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
update golangci-lint
This commit is contained in:
@@ -416,8 +416,10 @@ func (s *SessionDescription) unmarshalMediaDescription(value string) error {
|
||||
// Set according to currently registered with IANA
|
||||
// https://tools.ietf.org/html/rfc4566#section-5.14
|
||||
for _, proto := range strings.Split(fields[2], "/") {
|
||||
if i := indexOf(proto, []string{"UDP", "RTP", "AVP", "SAVP", "SAVPF",
|
||||
"MP2T", "TLS", "DTLS", "SCTP", "AVPF", "TCP"}); i == -1 {
|
||||
if i := indexOf(proto, []string{
|
||||
"UDP", "RTP", "AVP", "SAVP", "SAVPF",
|
||||
"MP2T", "TLS", "DTLS", "SCTP", "AVPF", "TCP",
|
||||
}); i == -1 {
|
||||
return fmt.Errorf("%w `%v`", errSDPInvalidNumericValue, fields[2])
|
||||
}
|
||||
newMediaDesc.MediaName.Protos = append(newMediaDesc.MediaName.Protos, proto)
|
||||
|
Reference in New Issue
Block a user