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 7d4afc6e36199f77baa394779aa026be203bb9c1..4925d3d87704cb0633f8ad45de786ca4a86162a0 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc |
@@ -37,7 +37,14 @@ bool PayloadIsCompatible(const RtpUtility::Payload& payload, |
bool PayloadIsCompatible(const RtpUtility::Payload& payload, |
const VideoCodec& video_codec) { |
- return !payload.audio && _stricmp(payload.name, video_codec.plName) == 0; |
+ if (payload.audio || _stricmp(payload.name, video_codec.plName) != 0) |
+ return false; |
+ // For H264, profiles must match as well. |
+ if (video_codec.codecType == kVideoCodecH264) { |
+ return video_codec.H264().profile == |
+ payload.typeSpecific.Video.h264_profile; |
+ } |
+ return true; |
} |
RtpUtility::Payload CreatePayloadType(const CodecInst& audio_codec) { |