mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 07:36:57 +08:00
fix multiple freezes during shutdown of components
This commit is contained in:
@@ -168,19 +168,12 @@ func (s *rtmpSource) runInner() bool {
|
||||
|
||||
s.log(logger.Info, "ready")
|
||||
|
||||
cres := make(chan sourceExtSetReadyRes)
|
||||
s.parent.OnSourceExternalSetReady(sourceExtSetReadyReq{
|
||||
Tracks: tracks,
|
||||
Res: cres,
|
||||
})
|
||||
<-cres
|
||||
|
||||
defer func() {
|
||||
res := make(chan struct{})
|
||||
s.parent.OnSourceExternalSetNotReady(sourceExtSetNotReadyReq{
|
||||
Res: res,
|
||||
})
|
||||
<-res
|
||||
s.parent.OnSourceExternalSetNotReady(sourceExtSetNotReadyReq{})
|
||||
}()
|
||||
|
||||
rtcpSenders := rtcpsenderset.New(tracks, s.parent.OnSourceFrame)
|
||||
|
Reference in New Issue
Block a user