diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-12-05 12:50:51 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2013-12-05 12:50:51 (GMT) |
commit | 8127ab13a14930d6e7c606aa3140478da432d544 (patch) | |
tree | ea06325ce3b6e269e9110ddfa4652e8ffa52961a | |
parent | 5d6289ae740f08efb383a98ee5100e57175637ae (diff) |
Get the number of frame sets when opening a file for reading.
-rw-r--r-- | src/lib/tng_io.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 9562622..8550ec4 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -10729,7 +10729,7 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get medium_stride_length = tng_data->medium_stride_length; /* Take long steps forward until a long step forward would be too long or - * the right frame set is found */ + * the last frame set is found */ file_pos = frame_set->long_stride_next_frame_set_file_pos; while(file_pos > 0) { @@ -10758,7 +10758,7 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get } /* Take medium steps forward until a medium step forward would be too long - * or the right frame set is found */ + * or the last frame set is found */ file_pos = frame_set->medium_stride_next_frame_set_file_pos; while(file_pos > 0) { @@ -10788,7 +10788,7 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get file_pos = frame_set->medium_stride_next_frame_set_file_pos; } - /* Take one step forward until the right frame set is found */ + /* Take one step forward until the last frame set is found */ file_pos = frame_set->next_frame_set_file_pos; while(file_pos > 0) { @@ -15892,6 +15892,8 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_open /* Read the file headers */ tng_file_headers_read(*tng_data_p, TNG_USE_HASH); + + tng_num_frame_sets_get(*tng_data_p, &(*tng_data_p)->n_trajectory_frame_sets); } if(mode == 'w') |