Use zero octets for rtp packet padding

RFC3550 Section 4 mention
"Octets designated as padding have the value zero."

Bug: None
Change-Id: Ife4c6226143c79ad7d152bc6099ba1d81f5492dd
Reviewed-on: https://webrtc-review.googlesource.com/c/103983
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25109}
This commit is contained in:
Danil Chapovalov
2018-10-10 14:56:01 +02:00
committed by Commit Bot
parent 3d255309e9
commit f7fcaf0885
6 changed files with 56 additions and 21 deletions

View File

@ -48,10 +48,7 @@ RtpPacketReceived CreateRtpPacket(uint32_t ssrc,
packet.SetCsrcs(csrcs);
}
packet.SetPayloadSize(payload_size);
if (padding_size > 0) {
Random random(17);
packet.SetPadding(padding_size, &random);
}
packet.SetPadding(padding_size);
return packet;
}