From 6f27ddf6cab9b3fb18bf10654f49f1d2e349f577 Mon Sep 17 00:00:00 2001 From: Abdelrahman Mahmoud Date: Wed, 22 Jun 2016 17:25:38 -0400 Subject: [PATCH] Fix bug, in video-demo not all the frames are wrote to the csv file due to a race condition --- video-demo/video-demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video-demo/video-demo.cpp b/video-demo/video-demo.cpp index 0dee192..5975675 100644 --- a/video-demo/video-demo.cpp +++ b/video-demo/video-demo.cpp @@ -189,7 +189,7 @@ int main(int argsc, char ** argsv) listenPtr->outputToFile(faces, frame.getTimestamp()); } - } while(VIDEO_EXTS[fileExt] && videoListenPtr->isRunning()); + } while (VIDEO_EXTS[fileExt] && (videoListenPtr->isRunning() || listenPtr->getDataSize() > 0)); } while(loop); detector->stop();