blob: 8678d11dcfe633deed67b64df446338d91da3a25 [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 */
10#include "webrtc/base/checks.h"
Peter Boströmba3e25e2016-02-23 11:35:30 +010011#include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
12#include "webrtc/system_wrappers/include/clock.h"
13
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 {}
21 void OnReceivedNack(const std::vector<uint16_t>&) override {};
22 void OnReceivedRtcpReportBlocks(const ReportBlockList&) override {};
23};
24
25}
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,
Danil Chapovalov97088842016-09-13 12:41:41 +020032 &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
37