Fork VCMPacket for PacketBuffer into own struct

it is easier to reduce and eliminate it when it is not bound to legacy video code

Bug: webrtc:10979
Change-Id: I517e298501b3358a914a23ddce40fcb3075d672d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159707
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29821}
This commit is contained in:
Danil Chapovalov
2019-11-14 14:57:33 +01:00
committed by Commit Bot
parent acdc22d784
commit aa3f5da8dc
8 changed files with 167 additions and 122 deletions

View File

@ -21,7 +21,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
if (size > 200000) {
return;
}
VCMPacket packet;
video_coding::PacketBuffer::Packet packet;
SimulatedClock clock(0);
video_coding::PacketBuffer packet_buffer(&clock, 8, 1024);
test::FuzzDataHelper helper(rtc::ArrayView<const uint8_t>(data, size));
@ -52,8 +52,8 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
// The packet buffer owns the payload of the packet.
uint8_t payload_size;
helper.CopyTo(&payload_size);
packet.sizeBytes = payload_size;
packet.dataPtr = new uint8_t[payload_size];
packet.size_bytes = payload_size;
packet.data = new uint8_t[payload_size];
IgnoreResult(packet_buffer.InsertPacket(&packet));
}