diff --git a/Demo.cpp b/Demo.cpp index 19e8fadc40cff172ec6b36faffe2a893be912714..644e9194375b80887c1507d2fd7c6cc07b60ad85 100644 --- a/Demo.cpp +++ b/Demo.cpp @@ -251,6 +251,7 @@ int main(int argc, char * argv[]) int everyPic= 60*5; //std::string fileName; int frameCounter=0; + int myFileTarWriterHeaderCounter = 0; int frameCounterOld = -1; vector<string> myFileErrorList;//list for pure io error vector<string> myFileListNoContour; //list for no contours found; @@ -297,9 +298,11 @@ int main(int argc, char * argv[]) if (r != ARCHIVE_OK) { cerr<<"archive_write_header() error: "<< archive_error_string(ext)<<endl; + myFileTarWriterHeaderCounter++; + continue; //we overjump all in our for loop } - else - { + //else + //{ //we copy all data to the buffer vector vec = copyDataInBuffer(archive); if(vec.empty()) @@ -311,7 +314,7 @@ int main(int argc, char * argv[]) cerr<<"archive_write_finish_entry: error: "<< archive_error_string(ext) <<" will abort"<< endl; exit(1); } - } + //} //we read the image buffer as a jpg picture and decode it Mat img_input = imdecode(Mat(vec), 1); @@ -591,6 +594,8 @@ int main(int argc, char * argv[]) //TODO we should merge the file + cout<< "amount of libarchive read header errors :"<< myFileTarWriterHeaderCounter; + //we write the random file list to a file std::string nameOutErrorList = outputDir + "fileErrorList.yml"; cout <<"amount of file errors: "<< myFileErrorList.size()<<endl;