diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 44e032979..5a2c646ab 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1846,6 +1846,7 @@ bool Monitor::Analyse() { while (!snap->decoded and !zm_terminate and !analysis_thread->Stopped()) { // Need to wait for the decoder thread. Debug(1, "Waiting for decode"); + packetqueue.notify_all(); // decode might be waiting packet_lock->wait(); if (!snap->image and snap->decoded) { Debug(1, "No image but was decoded, giving up"); diff --git a/src/zm_packetqueue.h b/src/zm_packetqueue.h index 7e2f367fc..2fc29ea33 100644 --- a/src/zm_packetqueue.h +++ b/src/zm_packetqueue.h @@ -81,6 +81,7 @@ class PacketQueue { ); bool is_there_an_iterator_pointing_to_packet(const std::shared_ptr &zm_packet); void unlock(ZMLockedPacket *lp); + void notify_all() { condition.notify_all(); }; }; #endif /* ZM_PACKETQUEUE_H */