mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
FS-7431 #resolve
This commit is contained in:
parent
3bbfa9f341
commit
464d8ab910
@ -48,10 +48,15 @@ static switch_status_t silence_stream_file_open(switch_file_handle_t *handle, co
|
|||||||
int ms;
|
int ms;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
sh = switch_core_alloc(handle->memory_pool, sizeof(*sh));
|
|
||||||
|
|
||||||
ms = atoi(path);
|
ms = atoi(path);
|
||||||
|
|
||||||
|
if (ms == 0) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid Input [%s] Expect <msec>[,<silence_factor>]\n", path);
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
sh = switch_core_alloc(handle->memory_pool, sizeof(*sh));
|
||||||
|
|
||||||
if (ms > 0) {
|
if (ms > 0) {
|
||||||
sh->samples = (handle->samplerate / 1000) * ms;
|
sh->samples = (handle->samplerate / 1000) * ms;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user