Chromium Code Reviews| 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 ce0bcd7fed9d9442033086fa79f428a035646db1..14e98a7793fd88c4270a87bc74d3c6e684255026 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
| @@ -25,7 +25,6 @@ RTPPayloadRegistry::RTPPayloadRegistry(RTPPayloadStrategy* rtp_payload_strategy) |
| last_received_media_payload_type_(-1), |
| rtx_(false), |
| rtx_payload_type_(-1), |
| - use_rtx_payload_mapping_on_restore_(false), |
| ssrc_rtx_(0) {} |
| RTPPayloadRegistry::~RTPPayloadRegistry() { |
| @@ -271,21 +270,17 @@ bool RTPPayloadRegistry::RestoreOriginalPacket(uint8_t* restored_packet, |
| int associated_payload_type; |
| auto apt_mapping = rtx_payload_type_map_.find(header.payloadType); |
| - if (use_rtx_payload_mapping_on_restore_ && |
| - apt_mapping != rtx_payload_type_map_.end()) { |
| - associated_payload_type = apt_mapping->second; |
| - } else { |
| - // In the future, this will be a bug. For now, just assume this RTX packet |
| - // matches the last non-RTX payload type we received. There are cases where |
| - // this could break, especially where RTX is sent outside of NACKing (e.g. |
| - // padding with redundant payloads). |
| - if (rtx_payload_type_ == -1 || incoming_payload_type_ == -1) { |
| - LOG(LS_WARNING) << "Incorrect RTX configuration, dropping packet."; |
| - return false; |
| - } |
| - associated_payload_type = incoming_payload_type_; |
| + if (apt_mapping == rtx_payload_type_map_.end()) |
| + return false; |
| + associated_payload_type = apt_mapping->second; |
| + if (red_payload_type_ != -1) { |
|
pbos-webrtc
2016/02/01 14:32:19
Does this path still have test coverage? It should
stefan-webrtc
2016/02/01 15:26:08
I added a test which specifically tests this path.
|
| + // Assume red will be used if it's configured. |
| + // This is a workaround for a Chrome sdp bug where rtx is associated |
| + // with the media codec even though media is sent over red. |
| + // TODO(holmer): Remove once the Chrome versions exposing this bug are |
| + // old enough. |
|
pbos-webrtc
2016/02/01 14:32:19
Put which Chrome versions these are, so you can re
stefan-webrtc
2016/02/01 15:26:08
Done.
|
| + associated_payload_type = red_payload_type_; |
| } |
| - |
| restored_packet[1] = static_cast<uint8_t>(associated_payload_type); |
| if (header.markerBit) { |
| restored_packet[1] |= kRtpMarkerBitMask; // Marker bit is set. |