diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-01-13 13:36:38 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-01-13 13:36:38 (GMT) |
commit | f3a885bdaf81bef5cfa1e3bc0bf91fb4d396ea44 (patch) | |
tree | 87b97fbb4fca79c77bac5a693a4ebf8f43c5a181 | |
parent | faa06f927bb642b5c5e89170987651e86f59db30 (diff) |
Reset current frame set file pos after counting frame sets.
-rw-r--r-- | src/lib/tng_io.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 71c8245..71ac2d6 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -10853,7 +10853,7 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get int64_t *n) { int64_t long_stride_length, medium_stride_length; - int64_t file_pos; + int64_t file_pos, orig_frame_set_file_pos; tng_trajectory_frame_set_t frame_set; struct tng_trajectory_frame_set orig_frame_set; tng_gen_block_t block; @@ -10867,6 +10867,7 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get frame_set = &tng_data->current_trajectory_frame_set; + orig_frame_set_file_pos = tng_data->current_trajectory_frame_set_input_file_pos; file_pos = tng_data->first_trajectory_frame_set_input_file_pos; tng_block_init(&block); @@ -10996,6 +10997,8 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get (long)tng_data->first_trajectory_frame_set_input_file_pos, SEEK_SET); + tng_data->current_trajectory_frame_set_input_file_pos = orig_frame_set_file_pos; + return(TNG_SUCCESS); } |