]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't block on read of video file in the core
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 19 Jun 2015 06:50:48 +0000 (01:50 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 19 Jun 2015 06:50:48 +0000 (01:50 -0500)
src/switch_core_media.c

index 41121f0cd8381e14ad3fff210328636cca3668d6..cf4e25dd1a008a48d0e70d9ffff03ede832a5810 100644 (file)
@@ -5000,11 +5000,11 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
                if (switch_channel_test_flag(channel, CF_VIDEO_READY)) {
                        switch_mutex_lock(mh->file_mutex);
                        if (smh->video_write_fh && switch_channel_ready(session->channel) && switch_test_flag(smh->video_write_fh, SWITCH_FILE_OPEN)) {
-                               switch_status_t wstatus = switch_core_file_read_video(smh->video_write_fh, &fr, SVR_BLOCK|SVR_FLUSH);
+                               switch_status_t wstatus = switch_core_file_read_video(smh->video_write_fh, &fr, SVR_FLUSH);
                                if (wstatus == SWITCH_STATUS_SUCCESS) {
                                        switch_core_session_write_video_frame(session, &fr, SWITCH_IO_FLAG_NONE, 0);
                                        switch_img_free(&fr.img);
-                               } else if (wstatus != SWITCH_STATUS_BREAK) {
+                               } else if (wstatus != SWITCH_STATUS_BREAK && wstatus != SWITCH_STATUS_IGNORE) {
                                        smh->video_write_fh = NULL;
                                }
                        } else if (smh->video_read_fh && switch_test_flag(smh->video_read_fh, SWITCH_FILE_OPEN) && read_frame->img) {