From e375d1d2f247af5888030980b6432081d98c812d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 17 May 2011 13:00:34 -0500 Subject: [PATCH] reset offset_pos on seek to 0 --- src/switch_core_file.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/switch_core_file.c b/src/switch_core_file.c index a3f7cc12cc..58b63bdc4b 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -445,15 +445,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_seek(switch_file_handle_t *fh, switch_set_flag(fh, SWITCH_FILE_SEEK); status = fh->file_interface->file_seek(fh, cur_pos, samples, whence); - if (samples) { - fh->offset_pos = *cur_pos; + fh->offset_pos = *cur_pos; - if (switch_test_flag(fh, SWITCH_FILE_FLAG_WRITE)) { - fh->samples_out = *cur_pos; - } + if (switch_test_flag(fh, SWITCH_FILE_FLAG_WRITE)) { + fh->samples_out = *cur_pos; } - return status; }