Increase maximum RTP padding length to 255 bytes

which is the maximum allowed in RFC 3550:
  The last octet of the padding contains a count of how
  many padding octets should be ignored, including itself

SRTP encryption does not need to be taken into account since none of
the cipher suites used by WebRTC require padding:
https://www.rfc-editor.org/rfc/rfc3711#section-3.1
https://www.rfc-editor.org/rfc/rfc7714#section-7.2

BUG=webrtc:15182

Change-Id: Ife3d264af389509733699f2dd4d32ba63793e9de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305642
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40101}
diff --git a/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc b/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
index c98680c..31bc13f 100644
--- a/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
+++ b/modules/congestion_controller/pcc/pcc_network_controller_unittest.cc
@@ -103,7 +103,7 @@
     c->bandwidth = DataRate::KilobitsPerSec(800);
     c->delay = TimeDelta::Millis(100);
   });
-  s.RunFor(TimeDelta::Seconds(20));
+  s.RunFor(TimeDelta::Seconds(40));
   EXPECT_NEAR(client->target_rate().kbps(), 750, 150);
   send_net->UpdateConfig([](NetworkSimulationConfig* c) {
     c->bandwidth = DataRate::KilobitsPerSec(200);
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index 5cc7724..8c0b2dd 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -38,8 +38,6 @@
 namespace webrtc {
 
 namespace {
-// Max in the RFC 3550 is 255 bytes, we limit it to be modulus 32 for SRTP.
-constexpr size_t kMaxPaddingLength = 224;
 constexpr size_t kMinAudioPaddingLength = 50;
 constexpr size_t kRtpHeaderLength = 12;
 
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index fb6c800..158d073 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -41,6 +41,9 @@
 class RtcEventLog;
 class RtpPacketToSend;
 
+// Maximum amount of padding in RFC 3550 is 255 bytes.
+constexpr size_t kMaxPaddingLength = 255;
+
 class RTPSender {
  public:
   RTPSender(const RtpRtcpInterface::Configuration& config,
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index a8c2831..68e0d4a 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -65,10 +65,8 @@
 const uint32_t kRtxSsrc = 12345;
 const uint32_t kFlexFecSsrc = 45678;
 const uint64_t kStartTime = 123456789;
-const size_t kMaxPaddingSize = 224u;
 const uint8_t kPayloadData[] = {47, 11, 32, 93, 89};
 const int64_t kDefaultExpectedRetransmissionTimeMs = 125;
-const size_t kMaxPaddingLength = 224;      // Value taken from rtp_sender.cc.
 const uint32_t kTimestampTicksPerMs = 90;  // 90kHz clock.
 constexpr absl::string_view kMid = "mid";
 constexpr absl::string_view kRid = "f";
@@ -1115,7 +1113,7 @@
     padding_bytes_generated += packet->padding_size();
   }
 
-  EXPECT_EQ(padding_bytes_generated, kMaxPaddingSize);
+  EXPECT_EQ(padding_bytes_generated, kMaxPaddingLength);
 }
 
 TEST_F(RtpSenderTest, LimitsPayloadPaddingSize) {
@@ -1187,7 +1185,7 @@
   // maximum size.
   const size_t kPaddingBytesRequested = kPayloadPacketSize + kRtxHeaderSize;
   const size_t kExpectedNumPaddingPackets =
-      (kPaddingBytesRequested + kMaxPaddingSize - 1) / kMaxPaddingSize;
+      (kPaddingBytesRequested + kMaxPaddingLength - 1) / kMaxPaddingLength;
   size_t padding_bytes_generated = 0;
   std::vector<std::unique_ptr<RtpPacketToSend>> padding_packets =
       GeneratePadding(kPaddingBytesRequested);
@@ -1204,7 +1202,7 @@
   }
 
   EXPECT_EQ(padding_bytes_generated,
-            kExpectedNumPaddingPackets * kMaxPaddingSize);
+            kExpectedNumPaddingPackets * kMaxPaddingLength);
 }
 
 TEST_F(RtpSenderTest, SupportsPadding) {