diff --git a/src/zm_event.h b/src/zm_event.h index 637f62dc3..667528bab 100644 --- a/src/zm_event.h +++ b/src/zm_event.h @@ -145,7 +145,10 @@ class Event { void AddFrame(const std::shared_ptr&packet); void Stop() { - terminate_ = true; + { + std::unique_lock lck(packet_queue_mutex); + terminate_ = true; + } packet_queue_condition.notify_all(); } bool Stopped() const { return terminate_; }