fix regression in video from commit c565501f55
This commit is contained in:
parent
0f7682a27c
commit
add9d26ac5
|
@ -3242,7 +3242,9 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tech_pvt->audio_recv_pt != tech_pvt->agreed_pt) {
|
if (tech_pvt->audio_recv_pt != tech_pvt->agreed_pt) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_CRIT, "Set audio receive payload to %u\n", tech_pvt->audio_recv_pt);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
|
||||||
|
"%s Set audio receive payload to %u\n", switch_channel_get_name(tech_pvt->channel), tech_pvt->audio_recv_pt);
|
||||||
|
|
||||||
switch_rtp_set_recv_pt(tech_pvt->rtp_session, tech_pvt->audio_recv_pt);
|
switch_rtp_set_recv_pt(tech_pvt->rtp_session, tech_pvt->audio_recv_pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3427,8 +3429,8 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||||
|
|
||||||
if (tech_pvt->video_recv_pt != tech_pvt->video_agreed_pt) {
|
if (tech_pvt->video_recv_pt != tech_pvt->video_agreed_pt) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
|
||||||
"Set video receive payload to %u\n", tech_pvt->video_recv_pt);
|
"%s Set video receive payload to %u\n", switch_channel_get_name(tech_pvt->channel), tech_pvt->video_recv_pt);
|
||||||
switch_rtp_set_recv_pt(tech_pvt->rtp_session, tech_pvt->video_recv_pt);
|
switch_rtp_set_recv_pt(tech_pvt->video_rtp_session, tech_pvt->video_recv_pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_channel_set_variable_printf(tech_pvt->channel, "sip_use_video_pt", "%d", tech_pvt->video_agreed_pt);
|
switch_channel_set_variable_printf(tech_pvt->channel, "sip_use_video_pt", "%d", tech_pvt->video_agreed_pt);
|
||||||
|
|
|
@ -2304,7 +2304,8 @@ static void do_2833(switch_rtp_t *rtp_session, switch_core_session_t *session)
|
||||||
|
|
||||||
SWITCH_DECLARE(void) rtp_flush_read_buffer(switch_rtp_t *rtp_session, switch_rtp_flush_t flush)
|
SWITCH_DECLARE(void) rtp_flush_read_buffer(switch_rtp_t *rtp_session, switch_rtp_flush_t flush)
|
||||||
{
|
{
|
||||||
if (switch_rtp_ready(rtp_session) && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA)) {
|
if (switch_rtp_ready(rtp_session) && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) &&
|
||||||
|
!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
|
||||||
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
|
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
|
||||||
switch (flush) {
|
switch (flush) {
|
||||||
case SWITCH_RTP_FLUSH_STICK:
|
case SWITCH_RTP_FLUSH_STICK:
|
||||||
|
@ -2860,7 +2861,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||||
rtp_session->recv_msg.header.pt != 13 &&
|
rtp_session->recv_msg.header.pt != 13 &&
|
||||||
rtp_session->recv_msg.header.pt != rtp_session->recv_te &&
|
rtp_session->recv_msg.header.pt != rtp_session->recv_te &&
|
||||||
(!rtp_session->cng_pt || rtp_session->recv_msg.header.pt != rtp_session->cng_pt) &&
|
(!rtp_session->cng_pt || rtp_session->recv_msg.header.pt != rtp_session->cng_pt) &&
|
||||||
rtp_session->recv_msg.header.pt != rtp_session->rpayload) {
|
rtp_session->recv_msg.header.pt != rtp_session->rpayload && 0) {
|
||||||
/* drop frames of incorrect payload number and return CNG frame instead */
|
/* drop frames of incorrect payload number and return CNG frame instead */
|
||||||
return_cng_frame();
|
return_cng_frame();
|
||||||
}
|
}
|
||||||
|
@ -2890,10 +2891,12 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_FLUSH)) {
|
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_FLUSH)) {
|
||||||
|
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
|
||||||
do_flush(rtp_session);
|
do_flush(rtp_session);
|
||||||
switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
|
|
||||||
bytes = 0;
|
bytes = 0;
|
||||||
}
|
}
|
||||||
|
switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes && bytes < 5) {
|
if (bytes && bytes < 5) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue