via: add9d26ac54291074ce0f82b971eaf7531a6c658 (commit)
from: 0f7682a27c04dbc979cd5cba8aafd0c70caac8eb (commit)
= COMMIT LOG ===========================================================
committer: Anthony Minessale
comments:
fix regression in video from commit c565501f555a507fa2c56eccedccdbba7a366d6d
diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c
index 66f5e52..ac4196a 100644
--- a/src/mod/endpoints/mod_sofia/sofia_glue.c
+++ b/src/mod/endpoints/mod_sofia/sofia_glue.c
@@ -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) {
- 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);
}
@@ -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) {
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);
- switch_rtp_set_recv_pt(tech_pvt->rtp_session, 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->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);
diff --git a/src/switch_rtp.c b/src/switch_rtp.c
index b6b3832..76b2c91 100644
--- a/src/switch_rtp.c
+++ b/src/switch_rtp.c
@@ -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)
{
- 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 (flush) {
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 != rtp_session->recv_te &&
(!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 */
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_VIDEO)) {
do_flush(rtp_session);
- switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
bytes = 0;
}
+ switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
+ }
if (bytes && bytes < 5) {
continue;
Summary of changes: src/mod/endpoints/mod_sofia/sofia_glue.c | 8 +++++--- src/switch_rtp.c | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-)
this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630
--
FreeSWITCH Source