mirror of
https://github.com/livekit/livekit.git
synced 2026-04-04 14:45:43 +00:00
Only assign TrackInfo Version on fresh publish. (#2325)
* Only assign TrackInfo Version on fresh publish. * remove redundant nil check
This commit is contained in:
@@ -1824,7 +1824,10 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
||||
}
|
||||
|
||||
ti.MimeType = track.Codec().MimeType
|
||||
ti.Version = p.params.VersionGenerator.New().ToProto()
|
||||
if utils.NewTimedVersionFromProto(ti.Version).IsZero() {
|
||||
// only assign version on a fresh publish, i. e. avoid updating version in scenarios like migration
|
||||
ti.Version = p.params.VersionGenerator.New().ToProto()
|
||||
}
|
||||
mt = p.addMediaTrack(signalCid, track.ID(), ti)
|
||||
newTrack = true
|
||||
p.dirty.Store(true)
|
||||
|
||||
Reference in New Issue
Block a user