@@ -736,6 +736,8 @@ namespace RTC
736736 packet->logger .Dropped (RtcLogger::RtpPacket::DropReason::CONSUMER_INACTIVE);
737737#endif
738738
739+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
740+
739741 return ;
740742 }
741743
@@ -745,6 +747,8 @@ namespace RTC
745747 packet->logger .Dropped (RtcLogger::RtpPacket::DropReason::INVALID_TARGET_LAYER);
746748#endif
747749
750+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
751+
748752 return ;
749753 }
750754
@@ -777,6 +781,8 @@ namespace RTC
777781 packet->logger .Dropped (RtcLogger::RtpPacket::DropReason::NOT_A_KEYFRAME);
778782#endif
779783
784+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
785+
780786 return ;
781787 }
782788
@@ -804,19 +810,20 @@ namespace RTC
804810 packet->logger .Dropped (RtcLogger::RtpPacket::DropReason::NOT_A_KEYFRAME);
805811#endif
806812
813+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
807814 return ;
808815 }
809816
810817 // If the packet belongs to current spatial layer being sent and packet does
811818 // not have payload other than padding, then drop it.
812819 if (spatialLayer == this ->currentSpatialLayer && packet->GetPayloadLength () == 0 )
813820 {
814- this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
815-
816821#ifdef MS_RTC_LOGGER_RTP
817822 packet->logger .Dropped (RtcLogger::RtpPacket::DropReason::EMPTY_PAYLOAD);
818823#endif
819824
825+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
826+
820827 return ;
821828 }
822829
@@ -935,6 +942,8 @@ namespace RTC
935942 packet->logger .Dropped (RtcLogger::RtpPacket::DropReason::TOO_HIGH_TIMESTAMP_EXTRA_NEEDED);
936943#endif
937944
945+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
946+
938947 return ;
939948 }
940949
@@ -980,6 +989,8 @@ namespace RTC
980989 RtcLogger::RtpPacket::DropReason::PACKET_PREVIOUS_TO_SPATIAL_LAYER_SWITCH);
981990#endif
982991
992+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
993+
983994 return ;
984995 }
985996 else if (SeqManager<uint16_t >::IsSeqHigherThan (
@@ -1022,12 +1033,12 @@ namespace RTC
10221033 // Rewrite payload if needed. Drop packet if necessary.
10231034 if (!packet->ProcessPayload (this ->encodingContext .get (), marker))
10241035 {
1025- this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
1026-
10271036#ifdef MS_RTC_LOGGER_RTP
10281037 packet->logger .Dropped (RtcLogger::RtpPacket::DropReason::DROPPED_BY_CODEC);
10291038#endif
10301039
1040+ this ->rtpSeqManager ->Drop (packet->GetSequenceNumber ());
1041+
10311042 return ;
10321043 }
10331044
0 commit comments