diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-12-02 08:22:00 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-12-02 08:22:00 (GMT) |
commit | dc622b86d3c09e9242a5693bc2a0cf6c6fde7754 (patch) | |
tree | 2014c6643312143c2887151ab82d13858285bf4d /src/lib/tng_io.c | |
parent | fe4160d48dcf1a64b7fdda2d6c78bfa37d924efc (diff) |
Update the number of frames in the current frame set.
When setting the overall expected number of frames per frame set
also update the current frame set if there is one. It is OK to
have frame sets with different numbers of frames, so previous
frame sets are unaffected.
Change-Id: I2051243dfb589810b4073e251281261797c8aa74
Diffstat (limited to 'src/lib/tng_io.c')
-rw-r--r-- | src/lib/tng_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c index 7163e4c..f4d2e24 100644 --- a/src/lib/tng_io.c +++ b/src/lib/tng_io.c @@ -10524,9 +10524,15 @@ tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_set (const tng_trajectory_t tng_data, const int64_t n) { + tng_trajectory_frame_set_t frame_set; TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup."); tng_data->frame_set_n_frames = n; + frame_set = &tng_data->current_trajectory_frame_set; + if(frame_set) + { + frame_set->n_frames = n; + } return(TNG_SUCCESS); } |