summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-01-26 14:31:50 +0000
committerHenri Herscher <henri@oreka.org>2006-01-26 14:31:50 +0000
commite4abe8e7b9a4c1dd6493dba1db6577af9f632019 (patch)
tree2981b2a1cb5a4449556e83eb9a64ea59053da0cf
parent1a99b8330683fb410ef89aee2d3ec9a78e57296f (diff)
Widended criteria for accepting RTP packet. TCP Port now need to be > 4000 and RTP payload type needs to be < 34
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@135 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r--orkaudio/audiocaptureplugins/voip/VoIp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
index df2b6bf..235d7ec 100644
--- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp
+++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
@@ -147,7 +147,7 @@ bool TryRtp(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader, UdpH
u_short dest = ntohs(udpHeader->dest);
if(!(ntohs(udpHeader->source)%2) && !(ntohs(udpHeader->dest)%2)) // udp ports must be even
{
- if(rtpHeader->pt == RTP_PT_PCMU || rtpHeader->pt == RTP_PT_PCMA)
+ if(rtpHeader->pt <= 34 ) // pt=34 is H263 and is the last possible valid codec
{
result = true;
u_char* payload = (u_char *)rtpHeader + sizeof(RtpHeaderStruct);
@@ -352,7 +352,7 @@ void HandlePacket(u_char *param, const struct pcap_pkthdr *header, const u_char
{
UdpHeaderStruct* udpHeader = (UdpHeaderStruct*)((char *)ipHeader + ipHeaderLength);
- if( ntohs(udpHeader->source) > 5000 && ntohs(udpHeader->dest) > 5000 )
+ if( ntohs(udpHeader->source) > 4000 && ntohs(udpHeader->dest) > 4000 )
{
u_char* udpPayload = (u_char *)udpHeader + sizeof(UdpHeaderStruct);