Index: webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc |
index 83bd2849df4304d26c27335360830ec8856f0193..c83c02091be462f0d5486c75f04e20e46272cd15 100644 |
--- a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc |
+++ b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc |
@@ -10,10 +10,9 @@ |
#include "webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h" |
-#include <assert.h> |
- |
#include <memory> |
+#include "webrtc/base/checks.h" |
#include "webrtc/base/logging.h" |
#include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h" |
@@ -235,15 +234,15 @@ int32_t FecReceiverImpl::ProcessReceivedFec() { |
crit_sect_.Leave(); |
return -1; |
} |
- assert(received_packet_list_.empty()); |
+ RTC_DCHECK(received_packet_list_.empty()); |
} |
// Send any recovered media packets to VCM. |
- ForwardErrorCorrection::RecoveredPacketList::iterator it = |
- recovered_packet_list_.begin(); |
- for (; it != recovered_packet_list_.end(); ++it) { |
- if ((*it)->returned) // Already sent to the VCM and the jitter buffer. |
+ for(auto* recovered_packet : recovered_packet_list_) { |
+ if (recovered_packet->returned) { |
+ // Already sent to the VCM and the jitter buffer. |
continue; |
- ForwardErrorCorrection::Packet* packet = (*it)->pkt; |
+ } |
+ ForwardErrorCorrection::Packet* packet = recovered_packet->pkt; |
++packet_counter_.num_recovered_packets; |
crit_sect_.Leave(); |
if (!recovered_packet_callback_->OnRecoveredPacket(packet->data, |
@@ -251,7 +250,7 @@ int32_t FecReceiverImpl::ProcessReceivedFec() { |
return -1; |
} |
crit_sect_.Enter(); |
- (*it)->returned = true; |
+ recovered_packet->returned = true; |
} |
crit_sect_.Leave(); |
return 0; |