Fixes a crash in the pacer where it fails to find a normal prio packet if there are no high prio packets, given that the queue has grown too large.
BUG=2682 R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/4599005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5190 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
1f7c8d8b6a
commit
b627f676b3
@ -326,6 +326,7 @@ void PacedSender::UpdateBytesPerInterval(uint32_t delta_time_ms) {
|
||||
|
||||
// MUST have critsect_ when calling.
|
||||
bool PacedSender::ShouldSendNextPacket(paced_sender::PacketList** packet_list) {
|
||||
*packet_list = NULL;
|
||||
if (media_budget_->bytes_remaining() <= 0) {
|
||||
// All bytes consumed for this interval.
|
||||
// Check if we have not sent in a too long time.
|
||||
@ -348,8 +349,9 @@ bool PacedSender::ShouldSendNextPacket(paced_sender::PacketList** packet_list) {
|
||||
high_priority_packets_->front().capture_time_ms_;
|
||||
*packet_list = high_priority_packets_.get();
|
||||
}
|
||||
if (!normal_priority_packets_->empty() && high_priority_capture_time >
|
||||
normal_priority_packets_->front().capture_time_ms_) {
|
||||
if (!normal_priority_packets_->empty() &&
|
||||
(high_priority_capture_time == -1 || high_priority_capture_time >
|
||||
normal_priority_packets_->front().capture_time_ms_)) {
|
||||
*packet_list = normal_priority_packets_.get();
|
||||
}
|
||||
if (*packet_list)
|
||||
|
Loading…
x
Reference in New Issue
Block a user