FS-10503 #comment disable write buffer for rtsp streaming
This commit is contained in:
parent
fd3c2fd3bf
commit
951b6c1464
|
@ -1544,6 +1544,7 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
|
||||||
const char *format = NULL;
|
const char *format = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
char file[1024];
|
char file[1024];
|
||||||
|
int disable_write_buffer = 0;
|
||||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
switch_set_string(file, path);
|
switch_set_string(file, path);
|
||||||
|
@ -1564,6 +1565,7 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
|
||||||
} else if (handle->stream_name && !strcasecmp(handle->stream_name, "rtsp")) {
|
} else if (handle->stream_name && !strcasecmp(handle->stream_name, "rtsp")) {
|
||||||
format = "rtsp";
|
format = "rtsp";
|
||||||
switch_snprintf(file, sizeof(file), "rtsp://%s", path);
|
switch_snprintf(file, sizeof(file), "rtsp://%s", path);
|
||||||
|
disable_write_buffer = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1798,6 +1800,10 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
|
||||||
handle->speed = 0;
|
handle->speed = 0;
|
||||||
handle->pos = 0;
|
handle->pos = 0;
|
||||||
|
|
||||||
|
if (disable_write_buffer) {
|
||||||
|
handle->pre_buffer_datalen = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Opening File [%s] %dhz %s\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Opening File [%s] %dhz %s\n",
|
||||||
file, handle->samplerate, context->has_video ? " with VIDEO" : "");
|
file, handle->samplerate, context->has_video ? " with VIDEO" : "");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue