| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 RTC_DCHECK(received_packets_.empty()); | 234 RTC_DCHECK(received_packets_.empty()); |
| 235 } | 235 } |
| 236 // Send any recovered media packets to VCM. | 236 // Send any recovered media packets to VCM. |
| 237 for (const auto& recovered_packet : recovered_packets_) { | 237 for (const auto& recovered_packet : recovered_packets_) { |
| 238 if (recovered_packet->returned) { | 238 if (recovered_packet->returned) { |
| 239 // Already sent to the VCM and the jitter buffer. | 239 // Already sent to the VCM and the jitter buffer. |
| 240 continue; | 240 continue; |
| 241 } | 241 } |
| 242 ForwardErrorCorrection::Packet* packet = recovered_packet->pkt; | 242 ForwardErrorCorrection::Packet* packet = recovered_packet->pkt; |
| 243 ++packet_counter_.num_recovered_packets; | 243 ++packet_counter_.num_recovered_packets; |
| 244 // Set this flag first; in case the recovered packet carries a RED |
| 245 // header, OnRecoveredPacket will recurse back here. |
| 246 recovered_packet->returned = true; |
| 244 crit_sect_.Leave(); | 247 crit_sect_.Leave(); |
| 245 recovered_packet_callback_->OnRecoveredPacket(packet->data, | 248 recovered_packet_callback_->OnRecoveredPacket(packet->data, |
| 246 packet->length); | 249 packet->length); |
| 247 crit_sect_.Enter(); | 250 crit_sect_.Enter(); |
| 248 recovered_packet->returned = true; | |
| 249 } | 251 } |
| 250 crit_sect_.Leave(); | 252 crit_sect_.Leave(); |
| 251 return 0; | 253 return 0; |
| 252 } | 254 } |
| 253 | 255 |
| 254 } // namespace webrtc | 256 } // namespace webrtc |
| OLD | NEW |