HDF5 dataset dimension is not adjusted when acquisition is stopped manually
When using HDF5 with multiple frames per file, say 100 frames, the number of frames in the last dataset is adjusted according to the total number of frames and maybe less that nb_frames_per_file.
However, when the acquisition is stopped before the end of the acquisition, the number of frames is not adjusted and the file may have a dataset which dimension is larger than the actual number of frames saved. For example, 10 frames in a 100 frames dataset.
It would be nice to be able to re-dimension (truncate) the dataset when stopping the acquisition.