Fixing issue for SDP avigilon when activating onvif backchannel #479 (#501)

* fixing issue for SDP avigilon when activating onvif backchannel

* keep track of original issue

* prevent deletion of first c=

* add tests

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
This commit is contained in:
Cédric Verstraeten
2024-01-14 12:08:29 +01:00
committed by GitHub
parent 1130b5687d
commit 6b0ba5dd64
3 changed files with 143 additions and 18 deletions

View File

@@ -482,6 +482,10 @@ func (s *SessionDescription) unmarshalMediaTitle(value string) error {
}
func (s *SessionDescription) unmarshalMediaConnectionInformation(value string) error {
if strings.HasPrefix(value, "SM ") {
return nil
}
latestMediaDesc := s.MediaDescriptions[len(s.MediaDescriptions)-1]
var err error
latestMediaDesc.ConnectionInformation, err = unmarshalConnectionInformation(value)