FS-7500: fix regression in no-camera mode
This commit is contained in:
parent
e7ab257c45
commit
405abc5177
|
@ -4638,18 +4638,19 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
unsigned char *buf = NULL;
|
unsigned char *buf = NULL;
|
||||||
switch_image_t *blank_img = NULL;
|
switch_image_t *blank_img = NULL;
|
||||||
switch_rgb_color_t bgcolor;
|
switch_rgb_color_t bgcolor;
|
||||||
|
switch_rtp_engine_t *v_engine = NULL;
|
||||||
|
|
||||||
switch_color_set_rgb(&bgcolor, "#000000");
|
switch_color_set_rgb(&bgcolor, "#000000");
|
||||||
blank_img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 320, 240, 1);
|
blank_img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 320, 240, 1);
|
||||||
switch_img_fill(blank_img, 0, 0, blank_img->d_w, blank_img->d_h, &bgcolor);
|
switch_img_fill(blank_img, 0, 0, blank_img->d_w, blank_img->d_h, &bgcolor);
|
||||||
|
|
||||||
//switch_rtp_engine_t *v_engine = NULL;
|
|
||||||
|
|
||||||
if (!(smh = session->media_handle)) {
|
if (!(smh = session->media_handle)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//v_engine = &smh->engines[SWITCH_MEDIA_TYPE_VIDEO];
|
v_engine = &smh->engines[SWITCH_MEDIA_TYPE_VIDEO];
|
||||||
|
|
||||||
switch_core_session_read_lock(session);
|
switch_core_session_read_lock(session);
|
||||||
|
|
||||||
|
@ -4713,6 +4714,10 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (v_engine->smode == SWITCH_MEDIA_FLOW_SENDONLY) {
|
||||||
|
switch_channel_set_flag(channel, CF_VIDEO_READY);
|
||||||
|
}
|
||||||
|
|
||||||
if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
||||||
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
|
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue