mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
update2
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4600 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
+14
-3
@@ -1012,11 +1012,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_destroy(switch_codec_t *codec)
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh,
|
||||
const switch_codec_implementation_t *codec_imp,
|
||||
char *file_path,
|
||||
uint8_t channels,
|
||||
uint32_t rate,
|
||||
unsigned int flags,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
@@ -1056,8 +1057,18 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh,
|
||||
fh->handler = switch_core_strdup(fh->memory_pool, rhs);
|
||||
}
|
||||
|
||||
fh->codec_imp = codec_imp;
|
||||
if (rate) {
|
||||
fh->samplerate = rate;
|
||||
} else {
|
||||
rate = 8000;
|
||||
}
|
||||
|
||||
if (channels) {
|
||||
fh->channels = channels;
|
||||
} else {
|
||||
fh->channels = 1;
|
||||
}
|
||||
|
||||
return fh->file_interface->file_open(fh, file_path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user