]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core] flush all the rtp on transfers
authorAnthony Minessale <anthm@signalwire.com>
Tue, 23 Jun 2020 05:52:53 +0000 (05:52 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:29 +0000 (22:00 +0300)
src/switch_core_media.c
src/switch_core_state_machine.c

index bfaff772894a1b9349e9eb86519967590043fe1a..340d9c29241f5724e7243fb9d4716ae20a8d9a5a 100644 (file)
@@ -13101,15 +13101,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
                goto end;
        case SWITCH_MESSAGE_INDICATE_AUDIO_SYNC:
                if (switch_rtp_ready(a_engine->rtp_session)) {
+                       switch_rtp_reset_jb(a_engine->rtp_session);
                        rtp_flush_read_buffer(a_engine->rtp_session, SWITCH_RTP_FLUSH_ONCE);
-                       //switch_rtp_reset_jb(a_engine->rtp_session);
                }
                goto end;
 
        case SWITCH_MESSAGE_INDICATE_VIDEO_SYNC:
                if (switch_rtp_ready(v_engine->rtp_session)) {
+                       switch_rtp_reset_jb(v_engine->rtp_session);
                        switch_rtp_flush(v_engine->rtp_session);
-                       //switch_rtp_reset_jb(v_engine->rtp_session);
                }
                goto end;
        case SWITCH_MESSAGE_INDICATE_3P_MEDIA:
index 7a8e2e5ab7d473616c021eea7148a5cd1bd5f6e9..ce47a6cd68b38ce448c9fdea1303a0241fce3ff6 100644 (file)
@@ -334,7 +334,9 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
        switch_channel_clear_flag(session->channel, CF_RESET);
 
        switch_core_session_video_reset(session);
-
+       switch_channel_audio_sync(session->channel);
+       switch_channel_video_sync(session->channel);
+       
        if ((extension = switch_channel_get_caller_extension(session->channel)) == 0) {
                switch_channel_hangup(session->channel, SWITCH_CAUSE_NORMAL_CLEARING);
                return;