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

Side by Side Diff: webrtc/test/rtcp_packet_parser.cc

Issue 1880443002: Fixed rtcp rpsi parsing of invalid packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 | « webrtc/modules/rtp_rtcp/source/rtcp_utility.cc ('k') | 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 break; 61 break;
62 case RTCPPacketTypes::kPsfbPli: 62 case RTCPPacketTypes::kPsfbPli:
63 pli_.Set(parser.Packet().PLI); 63 pli_.Set(parser.Packet().PLI);
64 break; 64 break;
65 case RTCPPacketTypes::kPsfbSli: 65 case RTCPPacketTypes::kPsfbSli:
66 sli_.Set(parser.Packet().SLI); 66 sli_.Set(parser.Packet().SLI);
67 break; 67 break;
68 case RTCPPacketTypes::kPsfbSliItem: 68 case RTCPPacketTypes::kPsfbSliItem:
69 sli_item_.Set(parser.Packet().SLIItem); 69 sli_item_.Set(parser.Packet().SLIItem);
70 break; 70 break;
71 case RTCPPacketTypes::kPsfbRpsi: 71 case RTCPPacketTypes::kPsfbRpsiItem:
72 rpsi_.Set(parser.Packet().RPSI); 72 rpsi_.Set(parser.Packet().RPSI);
73 break; 73 break;
74 case RTCPPacketTypes::kPsfbFir: 74 case RTCPPacketTypes::kPsfbFir:
75 fir_.Set(parser.Packet().FIR); 75 fir_.Set(parser.Packet().FIR);
76 break; 76 break;
77 case RTCPPacketTypes::kPsfbFirItem: 77 case RTCPPacketTypes::kPsfbFirItem:
78 fir_item_.Set(parser.Packet().FIRItem); 78 fir_item_.Set(parser.Packet().FIRItem);
79 break; 79 break;
80 case RTCPPacketTypes::kRtpfbNack: 80 case RTCPPacketTypes::kRtpfbNack:
81 nack_.Set(parser.Packet().NACK); 81 nack_.Set(parser.Packet().NACK);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 for (uint16_t i = 0; i < num_bytes - 1; ++i) { 133 for (uint16_t i = 0; i < num_bytes - 1; ++i) {
134 picture_id += (rpsi_.NativeBitString[i] & 0x7f); 134 picture_id += (rpsi_.NativeBitString[i] & 0x7f);
135 picture_id <<= 7; 135 picture_id <<= 7;
136 } 136 }
137 picture_id += (rpsi_.NativeBitString[num_bytes - 1] & 0x7f); 137 picture_id += (rpsi_.NativeBitString[num_bytes - 1] & 0x7f);
138 return picture_id; 138 return picture_id;
139 } 139 }
140 140
141 } // namespace test 141 } // namespace test
142 } // namespace webrtc 142 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_utility.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698