FS-11547: [core] Fix broken record_sample_rate variable.
This commit is contained in:
parent
972b3a3128
commit
82452988e2
|
@ -81,10 +81,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
|
||||||
}
|
}
|
||||||
|
|
||||||
fh->samples_in = 0;
|
fh->samples_in = 0;
|
||||||
fh->samplerate = 0;
|
|
||||||
fh->native_rate = 0;
|
if (!(flags & SWITCH_FILE_FLAG_WRITE)) {
|
||||||
fh->channels = 0;
|
fh->samplerate = 0;
|
||||||
fh->real_channels = 0;
|
fh->native_rate = 0;
|
||||||
|
fh->channels = 0;
|
||||||
|
fh->real_channels = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!fh->samplerate) {
|
if (!fh->samplerate) {
|
||||||
if (!(fh->samplerate = rate)) {
|
if (!(fh->samplerate = rate)) {
|
||||||
|
|
|
@ -1322,7 +1322,7 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
|
||||||
|
|
||||||
switch_core_session_get_read_impl(session, &rh->read_impl);
|
switch_core_session_get_read_impl(session, &rh->read_impl);
|
||||||
if (rh->fh) {
|
if (rh->fh) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Record session sample rate: %d -> %d\n", rh->fh->native_rate, rh->read_impl.actual_samples_per_second);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Record session sample rate: %d -> %d\n", rh->fh->native_rate, rh->fh->samplerate);
|
||||||
rh->fh->native_rate = rh->read_impl.actual_samples_per_second;
|
rh->fh->native_rate = rh->read_impl.actual_samples_per_second;
|
||||||
if (switch_core_file_has_video(rh->fh, SWITCH_TRUE)) {
|
if (switch_core_file_has_video(rh->fh, SWITCH_TRUE)) {
|
||||||
switch_core_media_bug_set_media_params(bug, &rh->fh->mm);
|
switch_core_media_bug_set_media_params(bug, &rh->fh->mm);
|
||||||
|
|
Loading…
Reference in New Issue