make ServerStream return an error if initialized before Server (#719) (#728)

This commit is contained in:
Alessandro Ros
2025-03-23 16:17:34 +01:00
committed by GitHub
parent fa94080e84
commit fcb018151b
9 changed files with 303 additions and 245 deletions

View File

@@ -102,7 +102,10 @@ func (s *server) setStreamReady(desc *description.Session) *gortsplib.ServerStre
Server: s.s,
Desc: desc,
}
s.stream.Initialize()
err := s.stream.Initialize()
if err != nil {
panic(err)
}
return s.stream
}