diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-01-24 11:13:31 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-01-24 11:13:31 +0100 |
commit | c060308464428b201f55b9863787f3617af8a2bd (patch) | |
tree | e986493be5f1bcb9a375c93d17246777a7b8ed65 /src/InputFileReader.cpp | |
parent | 109d40f1e598f9d122a91ad0267e6ce199b174a4 (diff) | |
parent | 782bb1624b3ac9d340cb12f2ca52b549c64c23e5 (diff) | |
download | dabmod-c060308464428b201f55b9863787f3617af8a2bd.tar.gz dabmod-c060308464428b201f55b9863787f3617af8a2bd.tar.bz2 dabmod-c060308464428b201f55b9863787f3617af8a2bd.zip |
Merge branch 'next'
Diffstat (limited to 'src/InputFileReader.cpp')
-rw-r--r-- | src/InputFileReader.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/InputFileReader.cpp b/src/InputFileReader.cpp index 52fbb99..205fbfa 100644 --- a/src/InputFileReader.cpp +++ b/src/InputFileReader.cpp @@ -284,13 +284,18 @@ int InputFileReader::GetNextFrame(void* buffer) if (read_bytes != frameSize) { // A short read of a frame (i.e. reading an incomplete frame) // is not tolerated. Input files must not contain incomplete frames - fprintf(stderr, - "Unable to read a complete frame of %u data bytes from input file!\n", - frameSize); + if (read_bytes != 0) { + fprintf(stderr, + "Unable to read a complete frame of %u data bytes from input file!\n", + frameSize); - perror(filename_.c_str()); - logger_.level(error) << "Unable to read from input file!"; - return -1; + perror(filename_.c_str()); + logger_.level(error) << "Unable to read from input file!"; + return -1; + } + else { + return 0; + } } memset(&((uint8_t*)buffer)[frameSize], 0x55, 6144 - frameSize); |