wait won't wake up other threads, so notify first. Since we have the lock, this should be ok
This commit is contained in:
parent
03f0762709
commit
d2cf89565e
|
@ -133,6 +133,7 @@ bool PacketQueue::queuePacket(std::shared_ptr<ZMPacket> add_packet) {
|
||||||
if (max_video_packet_count > 0) {
|
if (max_video_packet_count > 0) {
|
||||||
while (packet_counts[video_stream_id] > max_video_packet_count) {
|
while (packet_counts[video_stream_id] > max_video_packet_count) {
|
||||||
Error("Unable to free up older packets. Waiting.");
|
Error("Unable to free up older packets. Waiting.");
|
||||||
|
condition.notify_all();
|
||||||
condition.wait(lck);
|
condition.wait(lck);
|
||||||
if (deleting or zm_terminate)
|
if (deleting or zm_terminate)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue