diff --git a/src/include/switch_rtp.h b/src/include/switch_rtp.h index 440b5cc9a4..885ee2ac12 100644 --- a/src/include/switch_rtp.h +++ b/src/include/switch_rtp.h @@ -113,6 +113,7 @@ typedef struct ice_s { } ice_t; typedef enum { /* RTCP Control Packet types (PT) http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-4 */ + _RTCP_PT_FIR = 192, /* [RFC 2032] RTP Payload Format for H.261 Video Streams. types 192 (FIR) section 5.2.1 */ _RTCP_PT_IJ = 195, /* IJ: Extended inter-arrival jitter report RFC5450*/ _RTCP_PT_SR = 200, /* SR: sender report RFC3550 */ _RTCP_PT_RR = 201, /* RR: receiver report RFC3550 */ diff --git a/src/switch_core_media.c b/src/switch_core_media.c index aecc8a6296..7febd3afa9 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -5273,8 +5273,8 @@ static void switch_core_session_write_blank_video(switch_core_session_t *session width = smh->vid_params.width; height = smh->vid_params.height; - if (!width) width = 640; - if (!height) height = 480; + if (!width) width = 352; + if (!height) height = 288; if (!fps) fps = 15; if (!(width && height && fps)) { diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 77d4603c95..682e9eea69 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -5930,7 +5930,7 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t "RTCP packet bytes %" SWITCH_SIZE_T_FMT " type %d pad %d\n", bytes, msg->header.type, msg->header.p); - if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && (msg->header.type == _RTCP_PT_RTPFB || msg->header.type == _RTCP_PT_PSFB)) { + if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && (msg->header.type == _RTCP_PT_RTPFB || msg->header.type == _RTCP_PT_PSFB || msg->header.type < 200)) { rtcp_ext_msg_t *extp = (rtcp_ext_msg_t *) msg; if (extp->header.fmt != 15) { // <---- REMOVE WHEN BRIA STOPS SENDING UNSOLICITED REMB @@ -5938,7 +5938,12 @@ static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t rtp_type(rtp_session), msg->header.type, extp->header.fmt); } - if (msg->header.type == _RTCP_PT_PSFB && (extp->header.fmt == _RTCP_PSFB_FIR || extp->header.fmt == _RTCP_PSFB_PLI)) { + if (msg->header.type == _RTCP_PT_FIR || + (msg->header.type == _RTCP_PT_PSFB && (extp->header.fmt == _RTCP_PSFB_FIR || extp->header.fmt == _RTCP_PSFB_PLI))) { + + if (msg->header.type == _RTCP_PT_FIR) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "Ancient FIR Received. Hello from 1996!\n"); + } switch_core_media_gen_key_frame(rtp_session->session); if (rtp_session->vbw) { switch_jb_reset(rtp_session->vbw); @@ -6213,7 +6218,7 @@ static switch_status_t process_rtcp_packet(switch_rtp_t *rtp_session, switch_siz do { len = ((switch_size_t)ntohs(msg->header.length) * 4) + 4; - if (msg->header.version != 2 || !(msg->header.type > 199 && msg->header.type < 208)) { + if (msg->header.version != 2 || !(msg->header.type > 191 && msg->header.type < 210)) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "INVALID RTCP PACKET TYPE %d VER %d LEN %" SWITCH_SIZE_T_FMT "\n", msg->header.type, msg->header.version, len);