From 38cda24b5383b79b92ed659455ee9f33a5c6ce9b Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 15 Sep 2021 12:53:41 -0400 Subject: [PATCH] wait won't wake up other threads, so notify first. Since we have the lock, this should be ok --- src/zm_packetqueue.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zm_packetqueue.cpp b/src/zm_packetqueue.cpp index 43ab20d1e..cef7e8e2f 100644 --- a/src/zm_packetqueue.cpp +++ b/src/zm_packetqueue.cpp @@ -133,6 +133,7 @@ bool PacketQueue::queuePacket(std::shared_ptr add_packet) { if (max_video_packet_count > 0) { while (packet_counts[video_stream_id] > max_video_packet_count) { Error("Unable to free up older packets. Waiting."); + condition.notify_all(); condition.wait(lck); if (deleting or zm_terminate) return false;