mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Only write a received packet out if we are actually bridged to something
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
main/rtp.c
10
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user