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

@@ -121,7 +121,10 @@ func (sh *serverHandler) OnAnnounce(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (
Server: sh.s,
Desc: ctx.Description,
}
sh.stream.Initialize()
err := sh.stream.Initialize()
if err != nil {
panic(err)
}
sh.publisher = ctx.Session
return &base.Response{