Skip to content

Commit

Permalink
Bug 1934695 - Vendor libwebrtc from 711ecf44bb
Browse files Browse the repository at this point in the history
We already cherry-picked this when we vendored 79aff54b0f.

Upstream commit: https://webrtc.googlesource.com/src/+/711ecf44bb1247977f1ea0d8cda5e767af05b388
    [M132] h264: skip empty NAL units, do not reject them

    BUG=webrtc:380291923,chromium:381016774

    (cherry picked from commit b7cb8fe75a0b0f19a003e4f78f83fb7bd8fa84ef)

    Change-Id: If05268bde2ac0c600dcef479c88ca54dce708dcb
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368893
    Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
    Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
    Commit-Queue: Philipp Hancke <phancke@meta.com>
    Cr-Original-Commit-Position: refs/heads/main@{#43451}
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369480
    Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
    Cr-Commit-Position: refs/branch-heads/6834@{#3}
    Cr-Branched-From: a5d71009ac1dce7da23813dc9413c03073cfa8ca-refs/heads/main@{#43387}
  • Loading branch information
mfromanmoz committed Dec 5, 2024
1 parent fd80bc1 commit c0d25ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 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 @@ -33972,3 +33972,6 @@ a5d71009ac
# MOZ_LIBWEBRTC_SRC=/Users/mfroman/no_tm_backup/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
18db2cac3f
# MOZ_LIBWEBRTC_SRC=/Users/mfroman/no_tm_backup/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
711ecf44bb
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -22674,3 +22674,5 @@ libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-lib
libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-12-05T22:21:31.486441+00:00.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-12-05T22:24:12.966738+00:00.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /Users/mfroman/no_tm_backup/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-12-05T22:25:49.225051+00:00.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ std::optional<VideoRtpDepacketizer::ParsedRtpPayload> ProcessStapAOrSingleNalu(
nal_unit.subview(H264::kNaluTypeSize);

if (nalu_data.empty()) {
RTC_LOG(LS_ERROR) << "Empty NAL unit found.";
return std::nullopt;
RTC_LOG(LS_WARNING) << "Skipping empty NAL unit.";
continue;
}

switch (nalu.type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,5 +542,15 @@ TEST(VideoRtpDepacketizerH264Test, SeiSetsFirstPacketInFrame) {
EXPECT_TRUE(parsed->video_header.is_first_packet_in_frame);
}

TEST(VideoRtpDepacketizerH264Test, EmptyNaluPayload) {
const uint8_t kPayload[] = {
0x10, // End of sequence.
};
VideoRtpDepacketizerH264 depacketizer;
std::optional<VideoRtpDepacketizer::ParsedRtpPayload> parsed =
depacketizer.Parse(rtc::CopyOnWriteBuffer(kPayload));
ASSERT_TRUE(parsed);
}

} // namespace
} // namespace webrtc

This file was deleted.

0 comments on commit c0d25ca

Please sign in to comment.