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.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)
|
mt = p.addMediaTrack(signalCid, track.ID(), ti)
|
||||||
newTrack = true
|
newTrack = true
|
||||||
p.dirty.Store(true)
|
p.dirty.Store(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user