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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc

Issue 2196563003: Remove faulty DCHECK in rtcp::TransportFeedback::ParseFrom (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 } 737 }
738 packet->receive_deltas_.push_back( 738 packet->receive_deltas_.push_back(
739 ByteReader<int16_t>::ReadBigEndian(&buffer[index])); 739 ByteReader<int16_t>::ReadBigEndian(&buffer[index]));
740 index += 2; 740 index += 2;
741 break; 741 break;
742 default: 742 default:
743 continue; 743 continue;
744 } 744 }
745 } 745 }
746 746
747 RTC_DCHECK_GE(index, end_index - 3);
748 RTC_DCHECK_LE(index, end_index); 747 RTC_DCHECK_LE(index, end_index);
749 748
750 return packet; 749 return packet;
751 } 750 }
752 751
753 PacketStatusChunk* TransportFeedback::ParseChunk(const uint8_t* buffer, 752 PacketStatusChunk* TransportFeedback::ParseChunk(const uint8_t* buffer,
754 size_t max_size) { 753 size_t max_size) {
755 if (buffer[0] & 0x80) { 754 if (buffer[0] & 0x80) {
756 // First bit set => vector chunk. 755 // First bit set => vector chunk.
757 std::deque<StatusSymbol> symbols; 756 std::deque<StatusSymbol> symbols;
(...skipping 13 matching lines...) Expand all
771 "RLE block of size " << rle_chunk->NumSymbols() 770 "RLE block of size " << rle_chunk->NumSymbols()
772 << " but only " << max_size << " left to read."; 771 << " but only " << max_size << " left to read.";
773 delete rle_chunk; 772 delete rle_chunk;
774 return nullptr; 773 return nullptr;
775 } 774 }
776 return rle_chunk; 775 return rle_chunk;
777 } 776 }
778 777
779 } // namespace rtcp 778 } // namespace rtcp
780 } // namespace webrtc 779 } // 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