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); |