Use proper type cast (#719)

This commit is contained in:
Raja Subramanian
2022-05-26 13:58:46 +05:30
committed by GitHub
parent 77b8e9eecb
commit d77a8ad916
+4 -4
View File
@@ -347,7 +347,7 @@ func (s *StreamAllocator) onREMB(downTrack *DownTrack, remb *rtcp.ReceiverEstima
s.postEvent(Event{
Signal: SignalEstimate,
Data: remb.Bitrate,
Data: int64(remb.Bitrate),
})
}
@@ -362,7 +362,7 @@ func (s *StreamAllocator) onTransportCCFeedback(downTrack *DownTrack, fb *rtcp.T
func (s *StreamAllocator) onTargetBitrateChange(bitrate int) {
s.postEvent(Event{
Signal: SignalEstimate,
Data: bitrate,
Data: int64(bitrate),
})
}
@@ -523,8 +523,8 @@ func (s *StreamAllocator) handleSignalAdjustState(event *Event) {
}
func (s *StreamAllocator) handleSignalEstimate(event *Event) {
receivedEstimate, _ := event.Data.(int)
s.lastReceivedEstimate = int64(receivedEstimate)
receivedEstimate, _ := event.Data.(int64)
s.lastReceivedEstimate = receivedEstimate
// while probing, maintain estimate separately to enable keeping current committed estimate if probe fails
if s.isInProbe() {