Commit 993893e1 authored by Simon Morlat's avatar Simon Morlat

fix possible crash in case of missing report block in received rtcp packet

parent a94f569c
......@@ -48,14 +48,14 @@ typedef enum {
typedef struct rtcp_common_header
{
#ifdef ORTP_BIGENDIAN
uint16_t version:2;
uint16_t padbit:1;
uint16_t rc:5;
uint16_t packet_type:8;
uint16_t version:2;
uint16_t padbit:1;
uint16_t rc:5;
uint16_t packet_type:8;
#else
uint16_t rc:5;
uint16_t padbit:1;
uint16_t version:2;
uint16_t rc:5;
uint16_t padbit:1;
uint16_t version:2;
uint16_t packet_type:8;
#endif
uint16_t length:16;
......
......@@ -1093,7 +1093,8 @@ static void process_rtcp_packet( RtpSession *session, mblk_t *block ) {
rtpstream->last_rcv_SR_time.tv_sec = reception_date.tv_sec;
compute_rtt(session,&reception_date,&sr->rb[0]);
}else if ( rtcp_is_RR(block)){
compute_rtt(session,&reception_date,rtcp_RR_get_report_block(block,0));
const report_block_t *rb=rtcp_RR_get_report_block(block,0);
if (rb) compute_rtt(session,&reception_date,rb);
}
}while (rtcp_next_packet(block));
rtcp_rewind(block);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment