Bugfix: Exclude packet with zero SSRC in GetRtxOsnLoggingStatus Since 0 is the sentinel value for "unset rtx_ssrc", we should exclude it. Bug: b/423646186 Change-Id: Iff6e8985bdd20b8c1889a375b0023670a0162f3d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/481300 Auto-Submit: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47996}
diff --git a/video/timing/simulator/log_classifiers.cc b/video/timing/simulator/log_classifiers.cc index 4621d87..5544a41 100644 --- a/video/timing/simulator/log_classifiers.cc +++ b/video/timing/simulator/log_classifiers.cc
@@ -39,6 +39,10 @@ if (!parsed_log.incoming_rtx_ssrcs().contains(stream.ssrc)) { continue; } + // Skip "unset rtx_ssrc" streams. + if (stream.ssrc == 0) { + continue; + } // Check all packets for this video RTX stream. for (const LoggedRtpPacketIncoming& incoming_packet : stream.incoming_packets) {
diff --git a/video/timing/simulator/log_classifiers_unittest.cc b/video/timing/simulator/log_classifiers_unittest.cc index 8312b58..36ce4d5 100644 --- a/video/timing/simulator/log_classifiers_unittest.cc +++ b/video/timing/simulator/log_classifiers_unittest.cc
@@ -87,5 +87,14 @@ RtxOsnLoggingStatus::kAllRtxOsnLogged); } +TEST(GetRtxOsnLoggingStatusTest, RtxSsrc0IsExcluded) { + ParsedRtcEventLogBuilder builder; + builder.LogVideoRecvConfig(kSsrc, /*rtx_ssrc=*/0); + builder.LogRtpPacketIncoming(/*ssrc=*/0, std::nullopt); + std::unique_ptr<ParsedRtcEventLog> parsed_log = builder.Build(); + + EXPECT_EQ(GetRtxOsnLoggingStatus(*parsed_log), std::nullopt); +} + } // namespace } // namespace webrtc::video_timing_simulator