]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10249: [mod_av] Audio gradually falls behind video in recordings
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 19 May 2017 23:23:42 +0000 (18:23 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 19 May 2017 23:23:42 +0000 (18:23 -0500)
src/switch_ivr_async.c

index a8ad365dc354e1d82e16f624565b54d6b12c398e..de50fc283166e5dacdf03443b111f4bc879c3bcf 100644 (file)
@@ -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 &&