mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 00:22:35 +00:00
mod_av avformat remove unused code
This commit is contained in:
parent
e34b195988
commit
58ba5ec0ac
@ -1330,7 +1330,6 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
|
|||||||
{
|
{
|
||||||
av_file_context_t *context;
|
av_file_context_t *context;
|
||||||
char *ext;
|
char *ext;
|
||||||
unsigned int flags = 0;
|
|
||||||
const char *tmp = NULL;
|
const char *tmp = NULL;
|
||||||
AVOutputFormat *fmt;
|
AVOutputFormat *fmt;
|
||||||
const char *format = NULL;
|
const char *format = NULL;
|
||||||
@ -1364,19 +1363,6 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
|
|||||||
switch_core_timer_init(&context->timer, "soft", 1, 1000, context->pool);
|
switch_core_timer_init(&context->timer, "soft", 1, 1000, context->pool);
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "init timer\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "init timer\n");
|
||||||
|
|
||||||
if (switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
|
|
||||||
flags |= SWITCH_FOPEN_WRITE | SWITCH_FOPEN_CREATE;
|
|
||||||
if (switch_test_flag(handle, SWITCH_FILE_WRITE_APPEND) || switch_test_flag(handle, SWITCH_FILE_WRITE_OVER)) {
|
|
||||||
flags |= SWITCH_FOPEN_READ;
|
|
||||||
} else {
|
|
||||||
flags |= SWITCH_FOPEN_TRUNCATE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (switch_test_flag(handle, SWITCH_FILE_FLAG_READ)) {
|
|
||||||
flags |= SWITCH_FOPEN_READ;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch_buffer_create_dynamic(&context->audio_buffer, 512, 512, 0);
|
switch_buffer_create_dynamic(&context->audio_buffer, 512, 512, 0);
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sample rate: %d, channels: %d\n", handle->samplerate, handle->channels);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sample rate: %d, channels: %d\n", handle->samplerate, handle->channels);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user