From 513b9f522a70f3e3a580090d59d2b44a26e2a997 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 19 May 2017 18:23:42 -0500 Subject: [PATCH] FS-10249: [mod_av] Audio gradually falls behind video in recordings --- src/switch_ivr_async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index a8ad365dc3..de50fc2831 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -1515,7 +1515,7 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s break; case SWITCH_ABC_TYPE_READ_VIDEO_PING: case SWITCH_ABC_TYPE_STREAM_VIDEO_PING: - if (rh->fh) { + if (rh->fh && switch_test_flag(rh->fh, SWITCH_FILE_OPEN)) { if (!bug->video_ping_frame) break; if ((len || bug->video_ping_frame->img) && switch_core_file_write_video(rh->fh, bug->video_ping_frame) != SWITCH_STATUS_SUCCESS &&