]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
reset offset_pos on seek to 0
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 17 May 2011 18:00:34 +0000 (13:00 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 17 May 2011 18:00:40 +0000 (13:00 -0500)
src/switch_core_file.c

index a3f7cc12cced4bf77deb040886e894d7b4d4d3b0..58b63bdc4b3f5046138d61085580fbcc553e723c 100644 (file)
@@ -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;
 }