mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-20 13:36:51 +00:00
print 'ready' only when a source is really ready
This commit is contained in:
parent
a2ff0d455f
commit
60823aa2b6
@ -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})
|
||||
}()
|
||||
|
@ -175,8 +175,6 @@ func (s *rtspSource) runInner() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
s.log(logger.Info, "ready")
|
||||
|
||||
res := s.parent.OnSourceStaticSetReady(pathSourceStaticSetReadyReq{
|
||||
Source: s,
|
||||
Tracks: conn.Tracks(),
|
||||
@ -186,6 +184,8 @@ func (s *rtspSource) runInner() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
s.log(logger.Info, "ready")
|
||||
|
||||
defer func() {
|
||||
s.parent.OnSourceStaticSetNotReady(pathSourceStaticSetNotReadyReq{Source: s})
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user