From 6294bc1620c94785f23bf6ae6966aaa67cf34c7f Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 24 Jan 2011 09:41:53 -0600 Subject: [PATCH] have samples_out reflect what was written to the FH not the file even with buffering --- src/switch_core_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;