summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-29 10:09:43 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-11-29 10:09:43 (GMT)
commit88707939328087c5b439c072ae3c2bb0e4e1073c (patch)
tree3d87d5d72a7dadf48efa77dde6a0d68d4019b229
parent96d51aeb702182abcc5e5d0b48f956b5c3d8e78e (diff)
Improved *_next_frame_read()
-rw-r--r--src/lib/tng_io.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index f798b7c..0eb6d20 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -15728,8 +15728,13 @@ tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read
stat = tng_frame_set_of_frame_find(tng_data, i);
if(stat != TNG_SUCCESS)
{
+ printf("Cannot find frame set of frame %"PRId64". %s: %d\n",
+ frame_set->first_frame + i, __FILE__, __LINE__);
return(stat);
}
+ }
+ if(data->last_retrieved_frame < frame_set->first_frame)
+ {
stat = tng_frame_set_read_current_only_data_from_block_id(tng_data, TNG_USE_HASH, block_id);
if(stat != TNG_SUCCESS)
{
@@ -15864,6 +15869,9 @@ tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read
frame_set->first_frame + i, __FILE__, __LINE__);
return(stat);
}
+ }
+ if(data->last_retrieved_frame < frame_set->first_frame)
+ {
stat = tng_frame_set_read_current_only_data_from_block_id(tng_data, TNG_USE_HASH, block_id);
if(stat != TNG_SUCCESS)
{
contact: Jan Huwald // Impressum