mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-15 20:20:56 +08:00
print 'ready' only when a source is really ready
This commit is contained in:
@@ -156,8 +156,6 @@ func (s *rtmpSource) runInner() bool {
|
||||
tracks = append(tracks, audioTrack)
|
||||
}
|
||||
|
||||
s.log(logger.Info, "ready")
|
||||
|
||||
res := s.parent.OnSourceStaticSetReady(pathSourceStaticSetReadyReq{
|
||||
Source: s,
|
||||
Tracks: tracks,
|
||||
@@ -166,6 +164,8 @@ func (s *rtmpSource) runInner() bool {
|
||||
return err
|
||||
}
|
||||
|
||||
s.log(logger.Info, "ready")
|
||||
|
||||
defer func() {
|
||||
s.parent.OnSourceStaticSetNotReady(pathSourceStaticSetNotReadyReq{Source: s})
|
||||
}()
|
||||
|
Reference in New Issue
Block a user