1
Fork 0

Set time offsets and cname as soon as possible.

This commit is contained in:
Juliusz Chroboczek 2022-03-27 23:32:25 +02:00
parent e673cf1225
commit af462329ab
1 changed files with 7 additions and 0 deletions

View File

@ -449,6 +449,13 @@ func (up *rtpUpTrack) AddLocal(local conn.DownTrack) error {
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.mu.Unlock()