diff --git a/modules/pacing/paced_sender.cc b/modules/pacing/paced_sender.cc index 63e31569f6..18334e2a4a 100644 --- a/modules/pacing/paced_sender.cc +++ b/modules/pacing/paced_sender.cc @@ -57,12 +57,13 @@ int GetPriorityForType(RtpPacketToSend::Type type) { // Video has "normal" priority, in the old speak. return 2; case RtpPacketToSend::Type::kForwardErrorCorrection: - // Redundancy is OK to drop, but the content is hopefully not useless. - return 3; + // Send redundancy concurrently to video. If it is delayed it might have a + // lower chance of being useful. + return 2; case RtpPacketToSend::Type::kPadding: // Packets that are in themselves likely useless, only sent to keep the // BWE high. - return 4; + return 3; } } diff --git a/modules/pacing/paced_sender_unittest.cc b/modules/pacing/paced_sender_unittest.cc index 30ff00ad32..01023969fb 100644 --- a/modules/pacing/paced_sender_unittest.cc +++ b/modules/pacing/paced_sender_unittest.cc @@ -1479,7 +1479,7 @@ TEST_P(PacedSenderTest, OwnedPacketPrioritizedOnType) { // Insert a packet of each type, from low to high priority. Since priority // is weighted higher than insert order, these should come out of the pacer - // in backwards order. + // in backwards order with the exception of FEC and Video. for (RtpPacketToSend::Type type : {RtpPacketToSend::Type::kPadding, RtpPacketToSend::Type::kForwardErrorCorrection, @@ -1495,12 +1495,16 @@ TEST_P(PacedSenderTest, OwnedPacketPrioritizedOnType) { EXPECT_CALL( callback, SendPacket(Pointee(Property(&RtpPacketToSend::Ssrc, kVideoRtxSsrc)), _)); - EXPECT_CALL( - callback, - SendPacket(Pointee(Property(&RtpPacketToSend::Ssrc, kVideoSsrc)), _)); + + // FEC and video actually have the same priority, so will come out in + // insertion order. EXPECT_CALL( callback, SendPacket(Pointee(Property(&RtpPacketToSend::Ssrc, kFlexFecSsrc)), _)); + EXPECT_CALL( + callback, + SendPacket(Pointee(Property(&RtpPacketToSend::Ssrc, kVideoSsrc)), _)); + EXPECT_CALL( callback, SendPacket(Pointee(Property(&RtpPacketToSend::Ssrc, kVideoRtxSsrc)), _));