replace proto.Clone calls (#3024)

* replace proto.Clone calls

* deps

* tests
This commit is contained in:
Paul Wells
2024-09-18 22:47:33 -07:00
committed by GitHub
parent 978db00034
commit 4deaac2f3f
21 changed files with 62 additions and 62 deletions
+2 -3
View File
@@ -21,7 +21,6 @@ import (
"github.com/pion/rtcp"
"go.uber.org/zap/zapcore"
"google.golang.org/protobuf/proto"
"github.com/livekit/livekit-server/pkg/sfu/utils"
"github.com/livekit/mediatransportutil"
@@ -413,7 +412,7 @@ func (r *RTPStatsReceiver) getExtendedSenderReport(srData *livekit.RTCPSenderRep
}
}
srDataExt := proto.Clone(srData).(*livekit.RTCPSenderReportState)
srDataExt := protoutils.CloneProto(srData)
srDataExt.RtpTimestampExt = uint64(srDataExt.RtpTimestamp) + tsCycles
return srDataExt
}
@@ -567,7 +566,7 @@ func (r *RTPStatsReceiver) GetRtcpSenderReportData() *livekit.RTCPSenderReportSt
r.lock.RLock()
defer r.lock.RUnlock()
return proto.Clone(r.srNewest).(*livekit.RTCPSenderReportState)
return protoutils.CloneProto(r.srNewest)
}
func (r *RTPStatsReceiver) LastSenderReportTime() time.Time {