mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-20 14:34:27 +00:00
Merge pull request #1049 in FS/freeswitch from ~J0SH/freeswitch:blankimg to master
* commit '550d85210c0e1e3d71ce1217f07d1e196970b62d': FS-9725: Disable blank img with core_video_blank_image=false.
This commit is contained in:
commit
9d70c19f8d
@ -6303,6 +6303,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
|||||||
switch_rtp_engine_t *v_engine = NULL;
|
switch_rtp_engine_t *v_engine = NULL;
|
||||||
const char *var;
|
const char *var;
|
||||||
int buflen = SWITCH_RTP_MAX_BUF_LEN;
|
int buflen = SWITCH_RTP_MAX_BUF_LEN;
|
||||||
|
int blank_enabled = 1;
|
||||||
|
|
||||||
if (!(smh = session->media_handle)) {
|
if (!(smh = session->media_handle)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -6311,7 +6312,11 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
|||||||
switch_core_autobind_cpu();
|
switch_core_autobind_cpu();
|
||||||
|
|
||||||
if ((var = switch_channel_get_variable(session->channel, "core_video_blank_image"))) {
|
if ((var = switch_channel_get_variable(session->channel, "core_video_blank_image"))) {
|
||||||
blank_img = switch_img_read_png(var, SWITCH_IMG_FMT_I420);
|
if (switch_false(var)) {
|
||||||
|
blank_enabled = 0;
|
||||||
|
} else {
|
||||||
|
blank_img = switch_img_read_png(var, SWITCH_IMG_FMT_I420);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!blank_img) {
|
if (!blank_img) {
|
||||||
@ -6406,7 +6411,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
|||||||
|
|
||||||
vloops++;
|
vloops++;
|
||||||
|
|
||||||
send_blank = 1;
|
send_blank = blank_enabled;
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_VIDEO_READY) && !switch_test_flag(read_frame, SFF_CNG)) {
|
if (switch_channel_test_flag(channel, CF_VIDEO_READY) && !switch_test_flag(read_frame, SFF_CNG)) {
|
||||||
switch_mutex_lock(mh->file_read_mutex);
|
switch_mutex_lock(mh->file_read_mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user