| 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..d99e22110a31f4129af4a869cd619e3a3550772f 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) {
|
| @@ -74,6 +81,8 @@ RtpUtility::Payload CreatePayloadType(const VideoCodec& video_codec) {
|
| strncpy(payload.name, video_codec.plName, RTP_PAYLOAD_NAME_SIZE - 1);
|
| payload.typeSpecific.Video.videoCodecType =
|
| ConvertToRtpVideoCodecType(video_codec.codecType);
|
| + if (video_codec.codecType == kVideoCodecH264)
|
| + payload.typeSpecific.Video.h264_profile = video_codec.H264().profile;
|
| payload.audio = false;
|
| return payload;
|
| }
|
|
|