mirror of
https://github.com/aler9/gortsplib
synced 2025-10-27 17:21:22 +08:00
sdp: fix compatibility with Altasec NVRs (#476)
(https://github.com/bluenviron/mediamtx/issues/2762)
This commit is contained in:
@@ -89,6 +89,10 @@ func stringsReverseIndexByte(s string, b byte) int {
|
||||
func (s *SessionDescription) unmarshalOrigin(value string) error {
|
||||
value = strings.Replace(value, " IN IPV4 ", " IN IP4 ", 1)
|
||||
|
||||
if strings.HasSuffix(value, "IN IP4") {
|
||||
value += " "
|
||||
}
|
||||
|
||||
i := strings.Index(value, " IN IP4 ")
|
||||
if i < 0 {
|
||||
i = strings.Index(value, " IN IP6 ")
|
||||
|
||||
Reference in New Issue
Block a user