diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | src/dabOutput/dabOutputFile.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 2de0449..8c75fc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ script: make sudo make install popd + - | ./bootstrap.sh ./configure --enable-input-prbs --enable-input-test --enable-input-udp --enable-output-raw make diff --git a/src/dabOutput/dabOutputFile.cpp b/src/dabOutput/dabOutputFile.cpp index d7fd5c7..5b7543c 100644 --- a/src/dabOutput/dabOutputFile.cpp +++ b/src/dabOutput/dabOutputFile.cpp @@ -82,6 +82,7 @@ int DabOutputFile::Open(const char* filename) int DabOutputFile::Write(void* buffer, int size) { uint8_t padding[6144]; + const uint16_t frame_size = size; ++nbFrames_; switch (this->type_) { @@ -92,14 +93,14 @@ int DabOutputFile::Write(void* buffer, int size) // Writting nb frame length at end of file if (lseek(this->file_, 0, SEEK_END) == -1) goto FILE_WRITE_ERROR; - if (write(this->file_, &size, 2) == -1) goto FILE_WRITE_ERROR; + if (write(this->file_, &frame_size, 2) == -1) goto FILE_WRITE_ERROR; // Appending data if (write(this->file_, buffer, size) == -1) goto FILE_WRITE_ERROR; break; case ETI_FILE_TYPE_STREAMED: // Writting nb frame length at end of file - if (write(this->file_, &size, 2) == -1) goto FILE_WRITE_ERROR; + if (write(this->file_, &frame_size, 2) == -1) goto FILE_WRITE_ERROR; // Appending data if (write(this->file_, buffer, size) == -1) goto FILE_WRITE_ERROR; |