Add support for some FLIRs SDP timing format.

This commit is contained in:
CarlosReategui
2021-11-01 14:21:21 -07:00
committed by Alessandro Ros
parent 7e978595b5
commit e3d13be611
2 changed files with 159 additions and 0 deletions

View File

@@ -295,6 +295,10 @@ func (s *SessionDescription) unmarshalSessionAttribute(value string) error {
}
func (s *SessionDescription) unmarshalTiming(value string) error {
if value == "now-" {
// special case for some FLIR cameras with invalid timing element
value = "0 0"
}
fields := strings.Fields(value)
if len(fields) < 2 {
return fmt.Errorf("%w `t=%v`", errSDPInvalidSyntax, fields)