blob: cd763d0f605880416302b50a2ba3224dd21524e9 [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 */
Jonathan Metzman9f80b972018-10-05 10:38:13 -070010#include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#include "modules/rtp_rtcp/source/rtcp_receiver.h"
12#include "rtc_base/checks.h"
13#include "system_wrappers/include/clock.h"
Peter Boströmba3e25e2016-02-23 11:35:30 +010014
15namespace webrtc {
Danil Chapovalov97088842016-09-13 12:41:41 +020016namespace {
17
18class NullModuleRtpRtcp : public RTCPReceiver::ModuleRtpRtcp {
19 public:
20 void SetTmmbn(std::vector<rtcp::TmmbItem>) override {}
21 void OnRequestSendReport() override {}
Yves Gerey665174f2018-06-19 15:03:05 +020022 void OnReceivedNack(const std::vector<uint16_t>&) override{};
23 void OnReceivedRtcpReportBlocks(const ReportBlockList&) override{};
Danil Chapovalov97088842016-09-13 12:41:41 +020024};
25
Yves Gerey665174f2018-06-19 15:03:05 +020026} // namespace
Peter Boströmba3e25e2016-02-23 11:35:30 +010027
28void FuzzOneInput(const uint8_t* data, size_t size) {
Danil Chapovalov97088842016-09-13 12:41:41 +020029 NullModuleRtpRtcp rtp_rtcp_module;
30 SimulatedClock clock(1234);
Peter Boströmba3e25e2016-02-23 11:35:30 +010031
Peter Boströmba3e25e2016-02-23 11:35:30 +010032 RTCPReceiver receiver(&clock, false, nullptr, nullptr, nullptr, nullptr,
spranga790d832016-12-02 07:29:44 -080033 nullptr, &rtp_rtcp_module);
Peter Boströmba3e25e2016-02-23 11:35:30 +010034
Danil Chapovalov97088842016-09-13 12:41:41 +020035 receiver.IncomingPacket(data, size);
Peter Boströmba3e25e2016-02-23 11:35:30 +010036}
37} // namespace webrtc