From 52e9316afae51c70e782c933b2bae4ac41f3a5e4 Mon Sep 17 00:00:00 2001 From: Sam Dieck Date: Wed, 29 Nov 2017 01:02:44 -0600 Subject: [PATCH] Fixed frame memory management bug. Added worker thread sleep. --- src/daemon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/daemon.cpp b/src/daemon.cpp index 26a8c2d..09aaa16 100644 --- a/src/daemon.cpp +++ b/src/daemon.cpp @@ -309,6 +309,7 @@ void processingThread(void* arg) writeToQueue(response); } + usleep(10000); } } @@ -343,7 +344,7 @@ void streamRecognitionThread(void* arg) if (response != -1) { if (framesQueue.empty()) { - framesQueue.push(frame); + framesQueue.push(frame.clone()); } }