mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
examples: add missing mutex in OnSetup (#729)
This commit is contained in:
@@ -147,6 +147,9 @@ func (sh *serverHandler) OnSetup(ctx *gortsplib.ServerHandlerOnSetupCtx) (*base.
|
||||
}
|
||||
}
|
||||
|
||||
sh.mutex.Lock()
|
||||
defer sh.mutex.Unlock()
|
||||
|
||||
// no one is publishing yet
|
||||
if sh.stream == nil {
|
||||
return &base.Response{
|
||||
|
Reference in New Issue
Block a user