diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-31 14:46:46 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-31 14:46:46 +0000 |
commit | 2495e281f8b6f697c573fbb22baf9f0f708ebab9 (patch) | |
tree | f0f9ce138c438ab1ad2edd32fdab4bd65888b933 | |
parent | ef15019f664ddc865d919981a2d0a8d0349904ee (diff) |
Only write a received packet out if we are actually bridged to something
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41574 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/rtp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/main/rtp.c b/main/rtp.c index b53ad405b..619acc347 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -2843,10 +2843,12 @@ static int p2p_rtp_callback(int *id, int fd, short events, void *cbdata) } /* If this came from the RTP stream, write out via RTP - if it's RTCP, write out via RTCP */ - if (is_rtp) - bridge_p2p_rtp_write(rtp, header, res, hdrlen); - else if (is_rtcp) - bridge_p2p_rtcp_write(rtp, header, res); + if (ast_rtp_get_bridged(rtp)) { + if (is_rtp) + bridge_p2p_rtp_write(rtp, header, res, hdrlen); + else if (is_rtcp) + bridge_p2p_rtcp_write(rtp, header, res); + } return 1; } |