From: Anthony Minessale Date: Tue, 28 Apr 2015 19:44:26 +0000 (-0500) Subject: FS-7500: fix stat checking logic on video packets X-Git-Tag: v1.6.2~614^2~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66f9f985a8fa917dd97b4921630054554ae888c8;p=thirdparty%2Ffreeswitch.git FS-7500: fix stat checking logic on video packets --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 943e8ebc45..a76a5419fb 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -4819,7 +4819,7 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t } } - if (!rtp_session->jb || rtp_session->pause_jb || !jb_valid(rtp_session)) { + if (!rtp_session->vb && (!rtp_session->jb || rtp_session->pause_jb || !jb_valid(rtp_session))) { if (*bytes > rtp_header_len && (rtp_session->recv_msg.header.version == 2 && check_recv_payload(rtp_session))) { xcheck_jitter = *bytes; check_jitter(rtp_session); @@ -5252,23 +5252,23 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t if (rtp_session->vb) { switch_status_t vstatus = switch_vb_get_packet(rtp_session->vb, (switch_rtp_packet_t *) &rtp_session->recv_msg, bytes); + status = vstatus; switch(vstatus) { case SWITCH_STATUS_RESTART: switch_core_session_request_video_refresh(rtp_session->session); - status = SWITCH_STATUS_FALSE; + status = SWITCH_STATUS_BREAK; break; case SWITCH_STATUS_MORE_DATA: - status = SWITCH_STATUS_FALSE; + status = SWITCH_STATUS_BREAK; break; case SWITCH_STATUS_BREAK: switch_core_session_request_video_refresh(rtp_session->session); default: - status = SWITCH_STATUS_SUCCESS; break; } - if (status == SWITCH_STATUS_SUCCESS) { + if (vstatus == SWITCH_STATUS_SUCCESS) { if (!xcheck_jitter) { check_jitter(rtp_session); xcheck_jitter = *bytes;