diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/pc/rtp_transport.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/pc/rtp_transport.cc')
-rw-r--r-- | third_party/libwebrtc/pc/rtp_transport.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/third_party/libwebrtc/pc/rtp_transport.cc b/third_party/libwebrtc/pc/rtp_transport.cc index 653b51fd9e..7cf9fe0ace 100644 --- a/third_party/libwebrtc/pc/rtp_transport.cc +++ b/third_party/libwebrtc/pc/rtp_transport.cc @@ -180,12 +180,16 @@ bool RtpTransport::UnregisterRtpDemuxerSink(RtpPacketSinkInterface* sink) { return true; } +flat_set<uint32_t> RtpTransport::GetSsrcsForSink(RtpPacketSinkInterface* sink) { + return rtp_demuxer_.GetSsrcsForSink(sink); +} + void RtpTransport::DemuxPacket(rtc::CopyOnWriteBuffer packet, int64_t packet_time_us) { - webrtc::RtpPacketReceived parsed_packet( - &header_extension_map_, packet_time_us == -1 - ? Timestamp::MinusInfinity() - : Timestamp::Micros(packet_time_us)); + RtpPacketReceived parsed_packet(&header_extension_map_, + packet_time_us == -1 + ? Timestamp::MinusInfinity() + : Timestamp::Micros(packet_time_us)); if (!parsed_packet.Parse(std::move(packet))) { RTC_LOG(LS_ERROR) << "Failed to parse the incoming RTP packet before demuxing. Drop it."; @@ -226,7 +230,14 @@ void RtpTransport::OnSentPacket(rtc::PacketTransportInternal* packet_transport, const rtc::SentPacket& sent_packet) { RTC_DCHECK(packet_transport == rtp_packet_transport_ || packet_transport == rtcp_packet_transport_); + if (processing_sent_packet_) { + TaskQueueBase::Current()->PostTask(SafeTask( + safety_.flag(), [this, sent_packet] { SendSentPacket(sent_packet); })); + return; + } + processing_sent_packet_ = true; SendSentPacket(sent_packet); + processing_sent_packet_ = false; } void RtpTransport::OnRtpPacketReceived(rtc::CopyOnWriteBuffer packet, |