| 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 3d2aad42a0160170b3e6be6cfe55dc05834bb213..55d167879ba5e3cfff82fb704cc9a05e29b8a173 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc
|
| @@ -121,6 +121,11 @@ RTPPayloadRegistry::~RTPPayloadRegistry() = default;
|
|
|
| int32_t RTPPayloadRegistry::RegisterReceivePayload(const CodecInst& audio_codec,
|
| bool* created_new_payload) {
|
| +#if RTC_DCHECK_IS_ON
|
| + RTC_DCHECK(!used_for_video_);
|
| + used_for_audio_ = true;
|
| +#endif
|
| +
|
| *created_new_payload = false;
|
| if (!IsPayloadTypeValid(audio_codec.pltype))
|
| return -1;
|
| @@ -154,6 +159,11 @@ int32_t RTPPayloadRegistry::RegisterReceivePayload(const CodecInst& audio_codec,
|
|
|
| int32_t RTPPayloadRegistry::RegisterReceivePayload(
|
| const VideoCodec& video_codec) {
|
| +#if RTC_DCHECK_IS_ON
|
| + RTC_DCHECK(!used_for_audio_);
|
| + used_for_video_ = true;
|
| +#endif
|
| +
|
| if (!IsPayloadTypeValid(video_codec.plType))
|
| return -1;
|
|
|
|
|