fix(timestamp):add onProcess sync lock to make sure imgData be unique; issue[EYES-26]

This commit is contained in:
TinyOh
2019-03-05 13:45:42 +08:00
parent 764ccba041
commit 3c687d43ca
3 changed files with 13 additions and 0 deletions

View File

@@ -209,6 +209,7 @@ void Processor::Run() {
}
bool ok = false;
try {
std::unique_lock<std::mutex> lk(mtx_data_process_unique_);
if (callback_) {
if (callback_(input_.get(), output_.get(), parent_)) {
ok = true;

View File

@@ -103,6 +103,7 @@ class Processor :
bool input_ready_;
std::mutex mtx_input_ready_;
std::mutex mtx_data_process_unique_;
std::condition_variable cond_input_ready_;
bool idle_;