From dc622b86d3c09e9242a5693bc2a0cf6c6fde7754 Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Tue, 2 Dec 2014 09:22:00 +0100 Subject: 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 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); } -- cgit v0.10.1