Set time offsets and cname as soon as possible.
This commit is contained in:
@@ -449,6 +449,13 @@ func (up *rtpUpTrack) AddLocal(local conn.DownTrack) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if up.srNTPTime != 0 {
|
||||||
|
local.SetTimeOffset(up.srNTPTime, up.srRTPTime)
|
||||||
|
}
|
||||||
|
cname, ok := up.cname.Load().(string)
|
||||||
|
if ok && cname != "" {
|
||||||
|
local.SetCname(cname)
|
||||||
|
}
|
||||||
up.local = append(up.local, local)
|
up.local = append(up.local, local)
|
||||||
up.mu.Unlock()
|
up.mu.Unlock()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user