Fixed a bug in the detect loop that caused it to fail to load video
clips from ffmpeg.
This commit is contained in:
Maurice ONeal 2022-09-24 09:22:45 -04:00
parent 56bd855dbb
commit 737df9a0b6
2 changed files with 7 additions and 5 deletions

View File

@ -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
{

View File

@ -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