r_framesperfile configurable to have infinite frames in file with option 0

This commit is contained in:
2018-05-18 16:35:50 +02:00
parent 94ce042401
commit f393751771
6 changed files with 26 additions and 12 deletions

View File

@ -70,7 +70,8 @@ void BinaryFile::CloseAllFiles() {
}
int BinaryFile::WriteToFile(char* buffer, int buffersize, uint64_t fnum, uint32_t nump) {
if (numFramesInFile >= (*maxFramesPerFile)) {
// check if maxframesperfile = 0 for infinite
if ((*maxFramesPerFile) && (numFramesInFile >= (*maxFramesPerFile))) {
CloseCurrentFile();
CreateFile(fnum);
}