From a1fc18aee548ee0cede2a188969ba34ae14450d5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 18 May 2017 18:19:17 -0500 Subject: [PATCH] FS-10249: [mod_av] Audio gradually falls behind video in recordings --- src/switch_core_media_bug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index 83296481bb..cb16410656 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -577,8 +577,6 @@ static void *SWITCH_THREAD_FUNC video_bug_thread(switch_thread_t *thread, void * switch_status_t status; int w = 0, h = 0, ok = 1; - flush_video_queue(main_q, 1); - if ((status = switch_queue_pop(main_q, &pop)) == SWITCH_STATUS_SUCCESS) { if (!pop) { goto end; @@ -592,7 +590,7 @@ static void *SWITCH_THREAD_FUNC video_bug_thread(switch_thread_t *thread, void * if (other_q) { flush_video_queue(other_q, 1); - if ((status = switch_queue_pop(other_q, &other_pop)) == SWITCH_STATUS_SUCCESS) { + if ((status = switch_queue_trypop(other_q, &other_pop)) == SWITCH_STATUS_SUCCESS) { if (!(other_img = (switch_image_t *) other_pop)) { goto end; }