]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8240 #resolve [local_stream a/v gets out of sync when running in the background]
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 29 Sep 2015 19:44:57 +0000 (14:44 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 29 Sep 2015 19:44:57 +0000 (14:44 -0500)
src/mod/formats/mod_local_stream/mod_local_stream.c

index 9c9eedd8dd4f6d38d2f8998d38c6f609b003c23a..8c430c673d725a7cdce5ad75c9cfec4f73e08242 100644 (file)
@@ -279,6 +279,8 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
                                flush_video_queue(source->video_q);
                        }
 
+                       switch_buffer_zero(audio_buffer);
+                       
                        if (switch_core_timer_init(&timer, source->timer_name, source->interval, (int)source->samples, temp_pool) != SWITCH_STATUS_SUCCESS) {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Can't start timer.\n");
                                switch_dir_close(source->dir_handle);
@@ -325,7 +327,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
                                        if (source->chime_counter > 0) {
                                                source->chime_counter -= (int32_t)source->samples;
                                        }
-
+                                       
                                        if (!switch_test_flag((&source->chime_fh), SWITCH_FILE_OPEN) && source->chime_counter <= 0) {
                                                char *val;