Fix AssertFatal in replay_node when file size is not a multiple of block size

This commit is contained in:
luis_pereira87
2021-02-01 20:55:58 +00:00
parent 62bc47c820
commit 6885668273
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -200,7 +200,10 @@ int main(int argc, char *argv[]) {
int bufSize=100000;
void *buff=malloc(bufSize);
uint64_t timestamp=0;
const int blockSize=1000;
const int blockSize=1920;
// If fileSize is not multiple of blockSize*4 then discard remaining samples
fileSize = (fileSize/(blockSize<<2))*(blockSize<<2);
while (1) {
//Rewind the file to loop on the samples