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

@@ -117,7 +117,11 @@ func (sh *serverHandler) OnAnnounce(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (
}
// create the stream and save the publisher
sh.stream = gortsplib.NewServerStream(sh.s, ctx.Description)
sh.stream = &gortsplib.ServerStream{
Server: sh.s,
Desc: ctx.Description,
}
sh.stream.Initialize()
sh.publisher = ctx.Session
return &base.Response{