From 737df9a0b67b7b22828d18496ba688c5d211be70 Mon Sep 17 00:00:00 2001 From: Maurice ONeal Date: Sat, 24 Sep 2022 09:22:45 -0400 Subject: [PATCH] v1.3.t3 Fixed a bug in the detect loop that caused it to fail to load video clips from ffmpeg. --- src/common.h | 2 +- src/main.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common.h b/src/common.h index 70568bd..b2638a1 100644 --- a/src/common.h +++ b/src/common.h @@ -34,7 +34,7 @@ using namespace std; using namespace std::filesystem; #define BUF_SZ 10 -#define APP_VER "1.3.t2" +#define APP_VER "1.3.t3" struct shared_t { diff --git a/src/main.cpp b/src/main.cpp index 62a9f27..e84f0ba 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,22 +26,24 @@ void detectLoop(shared_t *share) Rect blockArea; Mat blockImg; - if (moDetect(bufFiles[0], &blockArea, &blockImg, share)) + auto fullPath = cleanDir(share->buffDir) + "/" + bufFiles[0]; + + if (moDetect(fullPath, &blockArea, &blockImg, share)) { if (objectInImage(blockImg, blockArea)) { share->skipCmd = true; - wrOut(bufFiles[0], share); + wrOut(fullPath, share); } else { - remove(bufFiles[0].c_str()); + remove(fullPath.c_str()); } } else { - remove(bufFiles[0].c_str()); + remove(fullPath.c_str()); } } else