]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9525 #resolve [Client initiated REINVITE with different audio codec into conferenc...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 22 Sep 2016 19:00:12 +0000 (14:00 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 22 Sep 2016 19:00:12 +0000 (14:00 -0500)
src/mod/applications/mod_conference/conference_loop.c
src/switch_core_codec.c

index c6b1a526bc99afb05a56a58fc05b15594bf23cf6..9df033de800b8739e3871d5b61eb077d38eaa158 100644 (file)
@@ -1108,18 +1108,19 @@ void conference_loop_output(conference_member_t *member)
        uint32_t flush_len;
        uint32_t low_count, bytes;
        call_list_t *call_list, *cp;
-       switch_codec_implementation_t read_impl = { 0 };
+       switch_codec_implementation_t read_impl = { 0 }, real_read_impl = { 0 };
        int sanity;
        switch_status_t st;
 
        switch_core_session_get_read_impl(member->session, &read_impl);
+       switch_core_session_get_real_read_impl(member->session, &real_read_impl);
 
 
        channel = switch_core_session_get_channel(member->session);
        interval = read_impl.microseconds_per_packet / 1000;
        samples = switch_samples_per_packet(member->conference->rate, interval);
        //csamples = samples;
-       tsamples = member->orig_read_impl.samples_per_packet;
+       tsamples = real_read_impl.samples_per_packet;
        low_count = 0;
        bytes = samples * 2 * member->conference->channels;
        call_list = NULL;
@@ -1136,8 +1137,8 @@ void conference_loop_output(conference_member_t *member)
                return;
        }
 
-       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Setup timer %s success interval: %u  samples: %u\n",
-                                         member->conference->timer_name, interval, tsamples);
+       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member->session), SWITCH_LOG_DEBUG, "Setup timer %s success interval: %u  samples: %u from codec %s\n",
+                                         member->conference->timer_name, interval, tsamples, real_read_impl.iananame);
 
 
        write_frame.data = data = switch_core_session_alloc(member->session, SWITCH_RECOMMENDED_BUFFER_SIZE);
index 93750aabb69b8de72b8a1a41b6188dba636ce3f1..c25357a74da0f46418b5d98f5657ad288b228a55 100644 (file)
@@ -132,6 +132,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_real_read_codec(switch_c
                                cur_codec = cur_codec->next;
                        }
                        session->real_read_codec = codec;
+                       session->real_read_impl = *codec->implementation;
+                       
                        /* set read_codec with real_read_codec if it no longer is ready */
                        if (!switch_core_codec_ready(session->read_codec)) {
                                session->read_codec = codec;