| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 if (packet_length > sizeof(restored_packet_)) | 359 if (packet_length > sizeof(restored_packet_)) |
| 360 return false; | 360 return false; |
| 361 rtc::CritScope lock(&receive_cs_); | 361 rtc::CritScope lock(&receive_cs_); |
| 362 if (restored_packet_in_use_) { | 362 if (restored_packet_in_use_) { |
| 363 LOG(LS_WARNING) << "Multiple RTX headers detected, dropping packet."; | 363 LOG(LS_WARNING) << "Multiple RTX headers detected, dropping packet."; |
| 364 return false; | 364 return false; |
| 365 } | 365 } |
| 366 if (!rtp_payload_registry_->RestoreOriginalPacket( | 366 if (!rtp_payload_registry_->RestoreOriginalPacket( |
| 367 restored_packet_, packet, &packet_length, rtp_receiver_->SSRC(), | 367 restored_packet_, packet, &packet_length, rtp_receiver_->SSRC(), |
| 368 header)) { | 368 header)) { |
| 369 LOG(LS_WARNING) << "Incoming RTX packet: Invalid RTP header"; | 369 LOG(LS_WARNING) << "Incoming RTX packet: Invalid RTP header ssrc: " |
| 370 << header.ssrc << " payload type: " |
| 371 << static_cast<int>(header.payloadType); |
| 370 return false; | 372 return false; |
| 371 } | 373 } |
| 372 restored_packet_in_use_ = true; | 374 restored_packet_in_use_ = true; |
| 373 bool ret = OnRecoveredPacket(restored_packet_, packet_length); | 375 bool ret = OnRecoveredPacket(restored_packet_, packet_length); |
| 374 restored_packet_in_use_ = false; | 376 restored_packet_in_use_ = false; |
| 375 return ret; | 377 return ret; |
| 376 } | 378 } |
| 377 return false; | 379 return false; |
| 378 } | 380 } |
| 379 | 381 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 rtp_receive_statistics_->GetStatistician(header.ssrc); | 473 rtp_receive_statistics_->GetStatistician(header.ssrc); |
| 472 if (!statistician) | 474 if (!statistician) |
| 473 return false; | 475 return false; |
| 474 // Check if this is a retransmission. | 476 // Check if this is a retransmission. |
| 475 int64_t min_rtt = 0; | 477 int64_t min_rtt = 0; |
| 476 rtp_rtcp_->RTT(rtp_receiver_->SSRC(), NULL, NULL, &min_rtt, NULL); | 478 rtp_rtcp_->RTT(rtp_receiver_->SSRC(), NULL, NULL, &min_rtt, NULL); |
| 477 return !in_order && | 479 return !in_order && |
| 478 statistician->IsRetransmitOfOldPacket(header, min_rtt); | 480 statistician->IsRetransmitOfOldPacket(header, min_rtt); |
| 479 } | 481 } |
| 480 } // namespace webrtc | 482 } // namespace webrtc |
| OLD | NEW |