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

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

Issue 2062103002: Add a libfuzzer for RtpHeaderParser. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use an enum value to count number of extensions Created 4 years, 6 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
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return rtp_header_extension_map_.RegisterInactive(type, id); 279 return rtp_header_extension_map_.RegisterInactive(type, id);
280 case kRtpExtensionPlayoutDelay: 280 case kRtpExtensionPlayoutDelay:
281 playout_delay_active_ = false; 281 playout_delay_active_ = false;
282 return rtp_header_extension_map_.RegisterInactive(type, id); 282 return rtp_header_extension_map_.RegisterInactive(type, id);
283 case kRtpExtensionTransmissionTimeOffset: 283 case kRtpExtensionTransmissionTimeOffset:
284 case kRtpExtensionAbsoluteSendTime: 284 case kRtpExtensionAbsoluteSendTime:
285 case kRtpExtensionAudioLevel: 285 case kRtpExtensionAudioLevel:
286 case kRtpExtensionTransportSequenceNumber: 286 case kRtpExtensionTransportSequenceNumber:
287 return rtp_header_extension_map_.Register(type, id); 287 return rtp_header_extension_map_.Register(type, id);
288 case kRtpExtensionNone: 288 case kRtpExtensionNone:
289 case kRtpExtensionNumberOfExtensions:
289 LOG(LS_ERROR) << "Invalid RTP extension type for registration"; 290 LOG(LS_ERROR) << "Invalid RTP extension type for registration";
290 return -1; 291 return -1;
291 } 292 }
292 return -1; 293 return -1;
293 } 294 }
294 295
295 bool RTPSender::IsRtpHeaderExtensionRegistered(RTPExtensionType type) { 296 bool RTPSender::IsRtpHeaderExtensionRegistered(RTPExtensionType type) {
296 rtc::CritScope lock(&send_critsect_); 297 rtc::CritScope lock(&send_critsect_);
297 return rtp_header_extension_map_.IsRegistered(type); 298 return rtp_header_extension_map_.IsRegistered(type);
298 } 299 }
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 rtc::CritScope lock(&send_critsect_); 1997 rtc::CritScope lock(&send_critsect_);
1997 1998
1998 RtpState state; 1999 RtpState state;
1999 state.sequence_number = sequence_number_rtx_; 2000 state.sequence_number = sequence_number_rtx_;
2000 state.start_timestamp = start_timestamp_; 2001 state.start_timestamp = start_timestamp_;
2001 2002
2002 return state; 2003 return state;
2003 } 2004 }
2004 2005
2005 } // namespace webrtc 2006 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698