void MaybeFuzzPayload() { // Read one byte of fuzz data to determine how many payload bytes to fuzz. if (data_ix_ + 1 > data_.size()) {
ended_ = true; return;
}
size_t bytes_to_fuzz = data_[data_ix_++];
// Restrict number of bytes to fuzz to 16; a reasonably low number enough to // cover a few RED headers. Also don't write outside the payload length.
bytes_to_fuzz = std::min(bytes_to_fuzz % 16, packet_->payload_size());
// Call `SetPayloadSize` to get access to the writable RTP payload without // changing its size.
uint8_t* payload = packet_->SetPayloadSize(packet_->payload_size());
std::memcpy(payload, &data_[data_ix_], bytes_to_fuzz);
data_ix_ += bytes_to_fuzz;
}
void FuzzOneInputTest(FuzzDataHelper fuzz_data) { auto input = std::make_unique<FuzzRtpInput>(fuzz_data.ReadRemaining());
std::unique_ptr<AudioChecksum> output(new AudioChecksum);
NetEqTest::Callbacks callbacks;
NetEq::Config config; auto codecs = NetEqTest::StandardDecoderMap(); // kPayloadType is the payload type that will be used for encoding. Verify // that it is included in the standard decoder map, and that it points to the // expected decoder type. constauto it = codecs.find(kPayloadType);
RTC_CHECK(it != codecs.end());
RTC_CHECK(it->second == SdpAudioFormat("L16", 32000, 1));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.