Reduce log spam This removes frequent output (typically 3 times in a row): "RED codec red is missing an associated payload type." Bug: none Change-Id: Ie7e0f344209cb01f9730960a6fec9d5987eaadfd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301720 Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39885}
diff --git a/pc/media_session.cc b/pc/media_session.cc index 23a2ad1..274d7ce 100644 --- a/pc/media_session.cc +++ b/pc/media_session.cc
@@ -948,8 +948,10 @@ std::string fmtp; if (!red_codec.GetParam(kCodecParamNotInNameValueFormat, &fmtp)) { // Normal for video/RED. - RTC_LOG(LS_WARNING) << "RED codec " << red_codec.name - << " is missing an associated payload type."; + if constexpr (std::is_same_v<C, AudioCodec>) { + RTC_LOG(LS_WARNING) << "RED codec " << red_codec.name + << " is missing an associated payload type."; + } return nullptr; }