]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
have samples_out reflect what was written to the FH not the file even with buffering
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 24 Jan 2011 15:41:53 +0000 (09:41 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 24 Jan 2011 15:42:11 +0000 (09:42 -0600)
src/switch_core_file.c

index c00756ffc67c93b2242c0be1b082c2bd72b6594d..19f23546f0fef7ee18b203e39f67a0d0e904c721 100644 (file)
@@ -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;