diff --git a/src/mynteye/api/processor.cc b/src/mynteye/api/processor.cc index ba06fa5..7559dc6 100644 --- a/src/mynteye/api/processor.cc +++ b/src/mynteye/api/processor.cc @@ -152,6 +152,8 @@ bool Processor::Process(std::shared_ptr in) { std::shared_ptr Processor::GetOutput() { std::lock_guard lk(mtx_result_); return std::shared_ptr(std::move(output_result_)); + // to make sure that one frame can just be get once! + output_result_ = nullptr; } std::uint64_t Processor::GetDroppedCount() { @@ -209,7 +211,6 @@ void Processor::Run() { } bool ok = false; try { - std::unique_lock lk(mtx_data_process_unique_); if (callback_) { if (callback_(input_.get(), output_.get(), parent_)) { ok = true; diff --git a/src/mynteye/api/processor.h b/src/mynteye/api/processor.h index 9c3b4d2..4cdaeac 100644 --- a/src/mynteye/api/processor.h +++ b/src/mynteye/api/processor.h @@ -103,7 +103,6 @@ class Processor : bool input_ready_; std::mutex mtx_input_ready_; - std::mutex mtx_data_process_unique_; std::condition_variable cond_input_ready_; bool idle_;