Chromium Code Reviews| Index: webrtc/call/call.cc | 
| diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc | 
| index 41f53feee7c57ed5e42753ad9e2a78075eb8a22c..2440cd79c41c09afd81c445d2ecc18250e99e99f 100644 | 
| --- a/webrtc/call/call.cc | 
| +++ b/webrtc/call/call.cc | 
| @@ -236,10 +236,10 @@ class Call : public webrtc::Call, | 
| MediaType media_type) | 
| SHARED_LOCKS_REQUIRED(receive_crit_); | 
| - rtc::Optional<RtpPacketReceived> ParseRtpPacket(const uint8_t* packet, | 
| - size_t length, | 
| - const PacketTime* packet_time) | 
| - SHARED_LOCKS_REQUIRED(receive_crit_); | 
| + rtc::Optional<RtpPacketReceived> ParseRtpPacket( | 
| + const uint8_t* packet, | 
| + size_t length, | 
| + const PacketTime* packet_time) const; | 
| void UpdateSendHistograms(int64_t first_sent_packet_ms) | 
| EXCLUSIVE_LOCKS_REQUIRED(&bitrate_crit_); | 
| @@ -485,7 +485,7 @@ Call::~Call() { | 
| rtc::Optional<RtpPacketReceived> Call::ParseRtpPacket( | 
| const uint8_t* packet, | 
| size_t length, | 
| - const PacketTime* packet_time) { | 
| + const PacketTime* packet_time) const { | 
| RtpPacketReceived parsed_packet; | 
| if (!parsed_packet.Parse(packet, length)) | 
| return rtc::Optional<RtpPacketReceived>(); | 
| @@ -1299,17 +1299,20 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, | 
| const PacketTime& packet_time) { | 
| TRACE_EVENT0("webrtc", "Call::DeliverRtp"); | 
| - RTC_DCHECK(media_type == MediaType::AUDIO || media_type == MediaType::VIDEO); | 
| - | 
| - ReadLockScoped read_lock(*receive_crit_); | 
| // TODO(nisse): We should parse the RTP header only here, and pass | 
| // on parsed_packet to the receive streams. | 
| rtc::Optional<RtpPacketReceived> parsed_packet = | 
| ParseRtpPacket(packet, length, &packet_time); | 
| + const bool is_keep_alive_packet = | 
| 
 
pbos-webrtc
2017/07/10 22:36:31
Can you put some reference to keepalive packets to
 
pbos-webrtc
2017/07/10 22:39:16
Reading the other CL, please check config_.rtp.kee
 
sprang_webrtc
2017/07/11 08:33:06
This is based on https://tools.ietf.org/html/rfc62
 
 | 
| + parsed_packet && parsed_packet->payload_size() == 0; | 
| + | 
| + RTC_DCHECK(media_type == MediaType::AUDIO || media_type == MediaType::VIDEO || | 
| + is_keep_alive_packet); | 
| if (!parsed_packet) | 
| return DELIVERY_PACKET_ERROR; | 
| + ReadLockScoped read_lock(*receive_crit_); | 
| auto it = receive_rtp_config_.find(parsed_packet->Ssrc()); | 
| if (it == receive_rtp_config_.end()) { | 
| LOG(LS_ERROR) << "receive_rtp_config_ lookup failed for ssrc " |