diff options
author | Henri Herscher <henri@oreka.org> | 2008-01-21 20:58:43 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2008-01-21 20:58:43 +0000 |
commit | f915e7cad47201430fdb9575ecd0a93efa0d1c2b (patch) | |
tree | 2721996d4fc370e932cb93744039bd7d53e724d9 /orkaudio/audiocaptureplugins/voip/VoIp.cpp | |
parent | 0a7ad6212471a88c4b3e42148cbef8f8ffa68730 (diff) |
Fixed potential orkaudio crash when RTP payload type was 127.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@520 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp')
-rw-r--r-- | orkaudio/audiocaptureplugins/voip/VoIp.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp index 7504272..f61ea67 100644 --- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp +++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp @@ -1060,7 +1060,11 @@ bool TryRtp(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader, UdpH u_short dest = ntohs(udpHeader->dest); if(!(ntohs(udpHeader->source)%2) && !(ntohs(udpHeader->dest)%2) || DLLCONFIG.m_rtpDetectOnOddPorts) // udp ports usually even { - if((rtpHeader->pt <= 34 && rtpHeader->pt != 13) || rtpHeader->pt == 97 || rtpHeader->pt == 98 || rtpHeader->pt > 98) // pt=34 is H263 and is the last possible valid codec, pt > 98 is for the case of SIP telephone-event + if((rtpHeader->pt <= 34 && rtpHeader->pt != 13) || (rtpHeader->pt >= 97 && rtpHeader->pt < 127) ) + // pt=13 is CN (Comfort Noise) + // pt=34 is H263 + // pt=97 is IAX2 iLBC payload + // pt > 98 is telephone-event in SIP { // pt=13 is CN (Comfort Noise) result = true; u_char* payload = (u_char *)rtpHeader + sizeof(RtpHeaderStruct); |