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

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

Issue 2296953003: Remove faulty DCHECK in rtcp::TransportFeedback DecodeSymbol (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 TransportFeedback::StatusSymbol DecodeSymbol(uint8_t value) { 55 TransportFeedback::StatusSymbol DecodeSymbol(uint8_t value) {
56 switch (value) { 56 switch (value) {
57 case 0: 57 case 0:
58 return TransportFeedback::StatusSymbol::kNotReceived; 58 return TransportFeedback::StatusSymbol::kNotReceived;
59 case 1: 59 case 1:
60 return TransportFeedback::StatusSymbol::kReceivedSmallDelta; 60 return TransportFeedback::StatusSymbol::kReceivedSmallDelta;
61 case 2: 61 case 2:
62 return TransportFeedback::StatusSymbol::kReceivedLargeDelta; 62 return TransportFeedback::StatusSymbol::kReceivedLargeDelta;
63 case 3:
64 // It is invalid, but |value| comes from network, so can be any.
65 return TransportFeedback::StatusSymbol::kNotReceived;
63 default: 66 default:
67 // Caller should pass 2 bits max.
64 RTC_NOTREACHED(); 68 RTC_NOTREACHED();
65 return TransportFeedback::StatusSymbol::kNotReceived; 69 return TransportFeedback::StatusSymbol::kNotReceived;
66 } 70 }
67 } 71 }
68 72
69 } // namespace 73 } // namespace
70 constexpr uint8_t TransportFeedback::kFeedbackMessageType; 74 constexpr uint8_t TransportFeedback::kFeedbackMessageType;
71 75
72 class TransportFeedback::PacketStatusChunk { 76 class TransportFeedback::PacketStatusChunk {
73 public: 77 public:
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 "RLE block of size " << rle_chunk->NumSymbols() 762 "RLE block of size " << rle_chunk->NumSymbols()
759 << " but only " << max_size << " left to read."; 763 << " but only " << max_size << " left to read.";
760 delete rle_chunk; 764 delete rle_chunk;
761 return nullptr; 765 return nullptr;
762 } 766 }
763 return rle_chunk; 767 return rle_chunk;
764 } 768 }
765 769
766 } // namespace rtcp 770 } // namespace rtcp
767 } // namespace webrtc 771 } // 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