blob: d87e002f679bcd80dac7949575b702dae7c6b684 [file] [log] [blame]
Peter Boströmba3e25e2016-02-23 11:35:30 +01001/*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020010#include "modules/rtp_rtcp/source/rtcp_receiver.h"
11#include "rtc_base/checks.h"
12#include "system_wrappers/include/clock.h"
Peter Boströmba3e25e2016-02-23 11:35:30 +010013
14namespace webrtc {
Danil Chapovalov97088842016-09-13 12:41:41 +020015namespace {
16
17class NullModuleRtpRtcp : public RTCPReceiver::ModuleRtpRtcp {
18 public:
19 void SetTmmbn(std::vector<rtcp::TmmbItem>) override {}
20 void OnRequestSendReport() override {}
Yves Gerey665174f2018-06-19 15:03:05 +020021 void OnReceivedNack(const std::vector<uint16_t>&) override{};
22 void OnReceivedRtcpReportBlocks(const ReportBlockList&) override{};
Danil Chapovalov97088842016-09-13 12:41:41 +020023};
24
Yves Gerey665174f2018-06-19 15:03:05 +020025} // namespace
Peter Boströmba3e25e2016-02-23 11:35:30 +010026
27void FuzzOneInput(const uint8_t* data, size_t size) {
Danil Chapovalov97088842016-09-13 12:41:41 +020028 NullModuleRtpRtcp rtp_rtcp_module;
29 SimulatedClock clock(1234);
Peter Boströmba3e25e2016-02-23 11:35:30 +010030
Peter Boströmba3e25e2016-02-23 11:35:30 +010031 RTCPReceiver receiver(&clock, false, nullptr, nullptr, nullptr, nullptr,
spranga790d832016-12-02 07:29:44 -080032 nullptr, &rtp_rtcp_module);
Peter Boströmba3e25e2016-02-23 11:35:30 +010033
Danil Chapovalov97088842016-09-13 12:41:41 +020034 receiver.IncomingPacket(data, size);
Peter Boströmba3e25e2016-02-23 11:35:30 +010035}
36} // namespace webrtc