From: Anthony Minessale Date: Mon, 24 Jan 2011 15:41:53 +0000 (-0600) Subject: have samples_out reflect what was written to the FH not the file even with buffering X-Git-Tag: v1.2-rc1~187^2~13^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6294bc1620c94785f23bf6ae6966aaa67cf34c7f;p=thirdparty%2Ffreeswitch.git have samples_out reflect what was written to the FH not the file even with buffering --- diff --git a/src/switch_core_file.c b/src/switch_core_file.c index c00756ffc6..19f23546f0 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -391,10 +391,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_write(switch_file_handle_t *fh, if ((status = fh->file_interface->file_write(fh, fh->pre_buffer_data, &blen)) != SWITCH_STATUS_SUCCESS) { *len = 0; } - fh->samples_out += blen; } } + fh->samples_out += orig_len; return status; } else { switch_status_t status;