Fix for "RTP dynamic payload type 100 is reserved"

TBR=perkj
BUG=227036 (in crbug.com)

TEST=out\Debug\voe_auto_test.exe --automated --gtest_filter=Dtmf* where I
manually modified the test and used 100 as new PT (which I first verified was
already used by CN, 48000).

BUG=

Review URL: https://webrtc-codereview.appspot.com/1319010

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3859 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrika@webrtc.org 2013-04-17 07:34:25 +00:00
parent f1a3b4bc0c
commit 4392d5f9f8

View File

@ -3182,11 +3182,14 @@ Channel::SetSendTelephoneEventPayloadType(unsigned char type)
memcpy(codec.plname, "telephone-event", 16);
if (_rtpRtcpModule->RegisterSendPayload(codec) != 0)
{
_engineStatisticsPtr->SetLastError(
VE_RTP_RTCP_MODULE_ERROR, kTraceError,
"SetSendTelephoneEventPayloadType() failed to register send"
"payload type");
return -1;
_rtpRtcpModule->DeRegisterSendPayload(codec.pltype);
if (_rtpRtcpModule->RegisterSendPayload(codec) != 0) {
_engineStatisticsPtr->SetLastError(
VE_RTP_RTCP_MODULE_ERROR, kTraceError,
"SetSendTelephoneEventPayloadType() failed to register send"
"payload type");
return -1;
}
}
_sendTelephoneEventPayloadType = type;
return 0;