Skip to content

Commit

Permalink
Bug 1847074 - Vendor libwebrtc from 2abe6e2214
Browse files Browse the repository at this point in the history
We already cherry-picked this when we vendored 151be743d4.

Upstream commit: https://webrtc.googlesource.com/src/+/2abe6e2214fa4fcecdb9614715c55a82c0067e25
    [M115] Bail out early if the RTP send module for a SSRC was not found

    since it might have been deregistered previously.

    BUG=chromium:1454860,chromium:1459124

    (cherry picked from commit c0ed83eac258032a2416b7e4200bd074a6455f4b)

    Change-Id: I70ba43265361d040e568f83b6400ff8f3c2a8e98
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311800
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Philipp Hancke <phancke@microsoft.com>
    Cr-Original-Commit-Position: refs/heads/main@{#40431}
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312121
    Cr-Commit-Position: refs/branch-heads/5790@{#7}
    Cr-Branched-From: 2eacbbc03a4a41ea658661225eb1c8fc07884c33-refs/heads/main@{#40122}
  • Loading branch information
mfromanmoz committed Aug 14, 2023
1 parent 0d8092e commit 4f35415
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
3 changes: 3 additions & 0 deletions third_party/libwebrtc/README.moz-ff-commit
Original file line number Diff line number Diff line change
Expand Up @@ -24042,3 +24042,6 @@ f5ffd45855
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
43670de877
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
2abe6e2214
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -16050,3 +16050,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-08-14T19:58:55.023984.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-08-14T19:59:50.566324.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-08-14T20:00:42.527963.
5 changes: 4 additions & 1 deletion third_party/libwebrtc/modules/pacing/packet_router.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ void PacketRouter::AddSendRtpModuleToMap(RtpRtcpInterface* rtp_module,
void PacketRouter::RemoveSendRtpModuleFromMap(uint32_t ssrc) {
RTC_DCHECK_RUN_ON(&thread_checker_);
auto it = send_modules_map_.find(ssrc);
RTC_DCHECK(it != send_modules_map_.end());
if (it == send_modules_map_.end()) {
RTC_LOG(LS_ERROR) << "No send module found for ssrc " << ssrc;
return;
}
send_modules_list_.remove(it->second);
RTC_CHECK(modules_used_in_current_batch_.empty());
send_modules_map_.erase(it);
Expand Down
16 changes: 11 additions & 5 deletions third_party/libwebrtc/modules/pacing/packet_router_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,18 +541,24 @@ TEST_F(PacketRouterDeathTest, DoubleRegistrationOfReceiveModuleDisallowed) {
packet_router_.RemoveReceiveRtpModule(&module);
}

TEST_F(PacketRouterDeathTest, RemovalOfNeverAddedSendModuleDisallowed) {
TEST_F(PacketRouterDeathTest, RemovalOfNeverAddedReceiveModuleDisallowed) {
NiceMock<MockRtpRtcpInterface> module;

EXPECT_DEATH(packet_router_.RemoveSendRtpModule(&module), "");
EXPECT_DEATH(packet_router_.RemoveReceiveRtpModule(&module), "");
}
#endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)

TEST_F(PacketRouterDeathTest, RemovalOfNeverAddedReceiveModuleDisallowed) {
TEST_F(PacketRouterTest, RemovalOfNeverAddedSendModuleIgnored) {
NiceMock<MockRtpRtcpInterface> module;
packet_router_.RemoveSendRtpModule(&module);
}

EXPECT_DEATH(packet_router_.RemoveReceiveRtpModule(&module), "");
TEST_F(PacketRouterTest, DuplicateRemovalOfSendModuleIgnored) {
NiceMock<MockRtpRtcpInterface> module;
packet_router_.AddSendRtpModule(&module, false);
packet_router_.RemoveSendRtpModule(&module);
packet_router_.RemoveSendRtpModule(&module);
}
#endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)

TEST(PacketRouterRembTest, ChangeSendRtpModuleChangeRembSender) {
rtc::ScopedFakeClock clock;
Expand Down

This file was deleted.

0 comments on commit 4f35415

Please sign in to comment.