]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5930 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 2 Nov 2013 15:31:23 +0000 (10:31 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Sat, 2 Nov 2013 15:31:23 +0000 (10:31 -0500)
src/mod/formats/mod_local_stream/mod_local_stream.c

index bae540801491760b021a4076822a33116b8950b1..a96d01c4c3279733ae5033f34f82db8288fb1713 100644 (file)
@@ -311,20 +311,20 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
                                if (!is_open || used >= source->prebuf || (source->total && used > source->samples * 2)) {
                                        used = switch_buffer_read(audio_buffer, dist_buf, source->samples * 2);
                                        if (source->total) {
-                                               uint32_t used = 0;
+                                               uint32_t bused = 0;
                                                switch_mutex_lock(source->mutex);
                                                for (cp = source->context_list; cp && RUNNING; cp = cp->next) {
                                                        if (switch_test_flag(cp->handle, SWITCH_FILE_CALLBACK)) {
                                                                continue;
                                                        }
                                                        switch_mutex_lock(cp->audio_mutex);
-                                                       used = switch_buffer_inuse(cp->audio_buffer);
-                                                       if (used > source->samples * 768) {
+                                                       bused = switch_buffer_inuse(cp->audio_buffer);
+                                                       if (bused > source->samples * 768) {
                                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Flushing Stream Handle Buffer [%s() %s:%d] size: %u samples: %ld\n", 
-                                                                                                 cp->func, cp->file, cp->line, used, (long)source->samples);
+                                                                                                 cp->func, cp->file, cp->line, bused, (long)source->samples);
                                                                switch_buffer_zero(cp->audio_buffer);
                                                        } else {
-                                                               switch_buffer_write(cp->audio_buffer, dist_buf, used);
+                                                               switch_buffer_write(cp->audio_buffer, dist_buf, bused);
                                                        }
                                                        switch_mutex_unlock(cp->audio_mutex);
                                                }