diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index ef11699105..b7f4b644cb 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -1126,7 +1126,7 @@ static switch_bool_t is_silence_frame(switch_frame_t *frame, int silence_thresho energy += abs(fdata[j]); j += codec_impl->number_of_channels; } - is_silence &= (uint32_t) (energy / (samples / divisor)) < silence_threshold; + is_silence &= (uint32_t) ((energy / (samples / divisor)) < silence_threshold); } return is_silence; @@ -1329,7 +1329,7 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s rh->silence_time = switch_micro_time_now(); } else { /* continuing silence */ - int duration_ms = (switch_micro_time_now() - rh->silence_time) / 1000; + int duration_ms = (int)((switch_micro_time_now() - rh->silence_time) / 1000); if (rh->silence_timeout_ms > 0 && duration_ms >= rh->silence_timeout_ms) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Recording file %s timeout: %i >= %i\n", rh->file, duration_ms, rh->silence_timeout_ms); switch_core_media_bug_set_flag(bug, SMBF_PRUNE); diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 453c6a7339..1541de9138 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -52,7 +52,7 @@ static void *SWITCH_THREAD_FUNC video_bridge_thread(switch_thread_t *thread, voi switch_channel_t *channel = switch_core_session_get_channel(vh->session_a); switch_channel_t *b_channel = switch_core_session_get_channel(vh->session_b); switch_status_t status; - switch_frame_t *read_frame; + switch_frame_t *read_frame = 0; switch_core_session_message_t msg = { 0 }; vh->up = 1;