Avoid log spamming when the dependency descriptor fail to parse.

Bug: none
Change-Id: I3f38f26eb84379cf64a39c9595ceb6bf235558a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291111
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39164}
This commit is contained in:
philipel 2023-01-20 13:13:01 +01:00 committed by WebRTC LUCI CQ
parent 4893638e72
commit c4ea5aeca9
2 changed files with 8 additions and 2 deletions

View file

@ -437,8 +437,12 @@ RtpVideoStreamReceiver2::ParseGenericDependenciesExtension(
// or too new packet (before relevant video_structure_ arrived).
// Drop such packet to be on the safe side.
// TODO(bugs.webrtc.org/10342): Stash too new packet.
RTC_LOG(LS_WARNING) << "ssrc: " << rtp_packet.Ssrc()
<< " Failed to parse dependency descriptor.";
Timestamp now = clock_->CurrentTime();
if (now - last_logged_failed_to_parse_dd_ > TimeDelta::Seconds(1)) {
last_logged_failed_to_parse_dd_ = now;
RTC_LOG(LS_WARNING) << "ssrc: " << rtp_packet.Ssrc()
<< " Failed to parse dependency descriptor.";
}
return kDropPacket;
}
if (dependency_descriptor.attached_structure != nullptr &&

View file

@ -377,6 +377,8 @@ class RtpVideoStreamReceiver2 : public LossNotificationSender,
// absl::nullopt when `video_structure_ == nullptr`;
absl::optional<int64_t> video_structure_frame_id_
RTC_GUARDED_BY(packet_sequence_checker_);
Timestamp last_logged_failed_to_parse_dd_
RTC_GUARDED_BY(packet_sequence_checker_) = Timestamp::MinusInfinity();
std::unique_ptr<RtpFrameReferenceFinder> reference_finder_
RTC_GUARDED_BY(packet_sequence_checker_);