fix after r6472 in rtp_sender, comparison between signed and unsigned integer expressions.

BUG=N/A
R=pwestin@webrtc.org, wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/15909004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6539 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrike@webrtc.org 2014-06-25 20:59:51 +00:00
parent 4ddcc40d32
commit fe526ff10f

View File

@ -705,7 +705,7 @@ void RTPSender::OnReceivedNACK(
bool RTPSender::ProcessNACKBitRate(const uint32_t now) { bool RTPSender::ProcessNACKBitRate(const uint32_t now) {
uint32_t num = 0; uint32_t num = 0;
int byte_count = 0; int byte_count = 0;
const int kAvgIntervalMs = 1000; const uint32_t kAvgIntervalMs = 1000;
uint32_t target_bitrate = GetTargetBitrate(); uint32_t target_bitrate = GetTargetBitrate();
CriticalSectionScoped cs(send_critsect_); CriticalSectionScoped cs(send_critsect_);
@ -721,13 +721,12 @@ bool RTPSender::ProcessNACKBitRate(const uint32_t now) {
byte_count += nack_byte_count_[num]; byte_count += nack_byte_count_[num];
} }
} }
int time_interval = kAvgIntervalMs; uint32_t time_interval = kAvgIntervalMs;
if (num == NACK_BYTECOUNT_SIZE) { if (num == NACK_BYTECOUNT_SIZE) {
// More than NACK_BYTECOUNT_SIZE nack messages has been received // More than NACK_BYTECOUNT_SIZE nack messages has been received
// during the last msg_interval. // during the last msg_interval.
time_interval = now - nack_byte_count_times_[num - 1]; if (nack_byte_count_times_[num - 1] <= now) {
if (time_interval < 0) { time_interval = now - nack_byte_count_times_[num - 1];
time_interval = kAvgIntervalMs;
} }
} }
return (byte_count * 8) < return (byte_count * 8) <