replace New* with Initialize (#723)

This commit is contained in:
Alessandro Ros
2025-03-16 13:58:35 +01:00
committed by GitHub
parent db959f854e
commit 376fb9e821
24 changed files with 296 additions and 124 deletions

View File

@@ -292,8 +292,12 @@ func TestServerRecordPath(t *testing.T) {
s = &Server{
Handler: &testServerHandler{
onAnnounce: func(ctx *ServerHandlerOnAnnounceCtx) (*base.Response, error) {
// make sure that media URLs are not overridden by NewServerStream()
stream := NewServerStream(s, ctx.Description)
// make sure that media URLs are not overridden by ServerStream.Initialize()
stream := &ServerStream{
Server: s,
Desc: ctx.Description,
}
stream.Initialize()
defer stream.Close()
return &base.Response{