diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index e2a1056622..bcb0b01230 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -3699,10 +3699,12 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc rtp->rxcount = 0; rtp->cycles = 0; rtp->lastrxseqno = 0; - rtp->rtcp->expected_prior = 0; - rtp->rtcp->received_prior = 0; rtp->last_seqno = 0; rtp->last_end_timestamp = 0; + if (rtp->rtcp) { + rtp->rtcp->expected_prior = 0; + rtp->rtcp->received_prior = 0; + } } rtp->rxssrc = ssrc;