]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9708
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 15 Nov 2016 16:25:25 +0000 (10:25 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 15 Nov 2016 16:25:31 +0000 (10:25 -0600)
src/switch_core_media.c

index 037f3218b90a7c04bbd4606bc79cebe7a82ce85d..f246d82a092ee191a7ec0f5fb2f9d7bec24f5a45 100644 (file)
@@ -6269,7 +6269,6 @@ static void *SWITCH_THREAD_FUNC audio_write_thread(switch_thread_t *thread, void
        
        switch_frame_buffer_create(&a_engine->write_fb, 500);
 
-
        while(switch_channel_up_nosig(session->channel) && mh->up == 1) {
                void *pop;
 
@@ -6283,6 +6282,8 @@ static void *SWITCH_THREAD_FUNC audio_write_thread(switch_thread_t *thread, void
                                                                   write_impl.samples_per_packet, switch_core_session_get_pool(session));
                        
                }
+               
+               switch_core_timer_next(&timer);
 
                if (switch_frame_buffer_trypop(a_engine->write_fb, &pop) == SWITCH_STATUS_SUCCESS && pop) {
                        switch_frame_t *frame = (switch_frame_t *)pop;
@@ -6294,9 +6295,6 @@ static void *SWITCH_THREAD_FUNC audio_write_thread(switch_thread_t *thread, void
                        perform_write(session, frame, SWITCH_IO_FLAG_QUEUED, 0);
                        switch_frame_buffer_free(a_engine->write_fb, &frame);
                }
-
-               switch_core_timer_next(&timer);
-
        }
 
        switch_mutex_lock(smh->control_mutex);