Allow VideoTimingExtension to be used with FEC

This CL allows for FEC protection of packets with VideoTimingExtension by
zero-ing out data, which is changed after FEC protection is generated (i.e
in the pacer or by the SFU).

Actual FEC protection of these packets would be enabled later, when all
modern receivers have this change.

Bug: webrtc:10750
Change-Id: If4785392204d68cb8527629727b5c062f9fb6600
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143760
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28396}
This commit is contained in:
Ilya Nikolaevskiy
2019-06-26 14:39:36 +02:00
committed by Commit Bot
parent e4ac723bdc
commit 2d821c3cbc
12 changed files with 100 additions and 131 deletions

View File

@ -123,10 +123,10 @@ FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) {
received_packet->is_fec = false;
// Insert entire packet into erasure code.
// TODO(brandtr): Remove this memcpy too.
received_packet->pkt = rtc::scoped_refptr<ForwardErrorCorrection::Packet>(
new ForwardErrorCorrection::Packet());
memcpy(received_packet->pkt->data, packet.data(), packet.size());
// Create a copy and fill with zeros all mutable extensions.
packet.CopyAndZeroMutableExtensions(received_packet->pkt->data);
received_packet->pkt->length = packet.size();
}