Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc

Issue 3004553002: When Ulpfec recovers a packet, set |returned| flag earlier. (Closed)
Patch Set: Revert "Add unittest. Not yet working." Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698