Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc

Issue 1964473002: Potential fix for rtx/red issue where red is removed only from the remote description. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
index 283c2846e1bc8fbf70c8d7e90b4ad887412d8040..ddbdd9b5339a046b2c97e690642c20fecfed5ce9 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
@@ -107,6 +107,7 @@ int32_t RTPPayloadRegistry::RegisterReceivePayload(
*created_new_payload = true;
if (RtpUtility::StringCompare(payload_name, "red", 3)) {
+ LOG(LS_ERROR) << "Red enabled: " << static_cast<int>(payload_type);
red_payload_type_ = payload_type;
} else if (RtpUtility::StringCompare(payload_name, "ulpfec", 6)) {
ulpfec_payload_type_ = payload_type;
@@ -124,6 +125,10 @@ int32_t RTPPayloadRegistry::DeRegisterReceivePayload(
rtc::CritScope cs(&crit_sect_);
RtpUtility::PayloadTypeMap::iterator it =
payload_type_map_.find(payload_type);
+ if (red_payload_type_ == payload_type) {
+ LOG(LS_ERROR) << "Red disabled";
+ red_payload_type_ = -1;
+ }
assert(it != payload_type_map_.end());
delete it->second;
payload_type_map_.erase(it);
@@ -270,6 +275,8 @@ bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t* restored_packet,
// TODO(holmer): Remove once the Chrome versions exposing this bug are
// old enough, which should be once Chrome Stable reaches M53 as this
// work-around went into M50.
+ LOG(LS_ERROR) << "Assuming red payload: "
+ << static_cast<int>(red_payload_type_);
associated_payload_type = red_payload_type_;
}
restored_packet[1] = static_cast<uint8_t>(associated_payload_type);

Powered by Google App Engine
This is Rietveld 408576698