From: Artur ZaprzaƂa Date: Thu, 19 Feb 2015 16:46:30 +0000 (+0100) Subject: FS-7307: When recording a call in native format, buffering does not work X-Git-Tag: v1.4.19~6^2~34^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e72fafb2c11d6fc8532f0de8d9d5d26200376fd;p=thirdparty%2Ffreeswitch.git FS-7307: When recording a call in native format, buffering does not work --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 0b58c11433..22d4d67dfd 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -2251,7 +2251,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t in_file = switch_core_session_sprintf(session, "%s-in.%s", file, ext); out_file = switch_core_session_sprintf(session, "%s-out.%s", file, ext); - + rh->in_fh.pre_buffer_datalen = rh->out_fh.pre_buffer_datalen = fh->pre_buffer_datalen; + channels = 1; + switch_set_flag(&rh->in_fh, SWITCH_FILE_NATIVE); + switch_set_flag(&rh->out_fh, SWITCH_FILE_NATIVE); if (switch_core_file_open(&rh->in_fh, in_file, channels, read_impl.actual_samples_per_second, file_flags, NULL) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error opening %s\n", in_file);