Merge "res_rtp_asterisk: Clearing the remote RTCP address causes RTCP failures"

pull/7/head
Jenkins2 9 years ago committed by Gerrit Code Review
commit 4262a5aa6a

@ -3908,7 +3908,7 @@ static int ast_rtp_write(struct ast_rtp_instance *instance, struct ast_frame *fr
return 0;
}
if (ast_sockaddr_isnull(&rtp->rtcp->them)) {
if (ast_sockaddr_isnull(&rtp->rtcp->them) || rtp->rtcp->schedid < 0) {
/*
* RTCP was stopped.
*/
@ -5527,10 +5527,10 @@ static void ast_rtp_remote_address_set(struct ast_rtp_instance *instance, struct
}
}
if (rtp->rtcp) {
if (rtp->rtcp && !ast_sockaddr_isnull(addr)) {
ast_debug(1, "Setting RTCP address on RTP instance '%p'\n", instance);
ast_sockaddr_copy(&rtp->rtcp->them, addr);
if (!ast_sockaddr_isnull(addr)) {
if (rtp->rtcp->type == AST_RTP_INSTANCE_RTCP_STANDARD) {
ast_sockaddr_set_port(&rtp->rtcp->them, ast_sockaddr_port(addr) + 1);
@ -5542,7 +5542,6 @@ static void ast_rtp_remote_address_set(struct ast_rtp_instance *instance, struct
ast_free(rtp->rtcp->local_addr_str);
rtp->rtcp->local_addr_str = ast_strdup(ast_sockaddr_stringify(&local));
}
}
rtp->rxseqno = 0;
@ -5751,9 +5750,6 @@ static void ast_rtp_stop(struct ast_rtp_instance *instance)
}
ast_rtp_instance_set_remote_address(instance, &addr);
if (rtp->rtcp) {
ast_sockaddr_setnull(&rtp->rtcp->them);
}
ast_set_flag(rtp, FLAG_NEED_MARKER_BIT);
}

Loading…
Cancel
Save