rtp->seedrxseqno = seqno;
}
- if (rtp->rtcp->schedid < 1) {
+ if (rtp->rtcp && rtp->rtcp->schedid < 1) {
/* Schedule transmission of Receiver Report */
rtp->rtcp->schedid = ast_sched_add(rtp->sched, ast_rtcp_calc_interval(rtp), ast_rtcp_write, rtp);
}
void ast_rtp_stop(struct ast_rtp *rtp)
{
- if (rtp->rtcp->schedid > 0) {
+ if (rtp->rtcp && rtp->rtcp->schedid > 0) {
ast_sched_del(rtp->sched, rtp->rtcp->schedid);
rtp->rtcp->schedid = -1;
}
ast_verbose(" RTT: %f\n", rtp->rtcp->rtt);
}
- if (rtp->rtcp->schedid > 0) {
- ast_sched_del(rtp->sched, rtp->rtcp->schedid);
- rtp->rtcp->schedid = -1;
- }
-
if (rtp->smoother)
ast_smoother_free(rtp->smoother);
if (rtp->ioid)
if (rtp->s > -1)
close(rtp->s);
if (rtp->rtcp) {
+ if (rtp->rtcp->schedid > 0)
+ ast_sched_del(rtp->sched, rtp->rtcp->schedid);
close(rtp->rtcp->s);
free(rtp->rtcp);
rtp->rtcp=NULL;
rtp->txcount++;
rtp->txoctetcount +=(res - hdrlen);
- if (rtp->rtcp->schedid < 1)
+ if (rtp->rtcp && rtp->rtcp->schedid < 1)
rtp->rtcp->schedid = ast_sched_add(rtp->sched, ast_rtcp_calc_interval(rtp), ast_rtcp_write, rtp);
}