From 405be70430dd422cf9f9abf7f1bea853c2ed34ec Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Apr 2021 21:26:01 -0400 Subject: [PATCH] Use packetqueue unlock to also notify --- src/zm_monitor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index a857a2180..88d45bf62 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2280,7 +2280,9 @@ bool Monitor::Analyse() { } // end if state machine if ( (function == MODECT or function == MOCORD) and snap->image ) { + Debug(1, "Blending"); ref_image.Blend(*(snap->image), ( state==ALARM ? alarm_ref_blend_perc : ref_blend_perc )); + Debug(1, "Done Blending"); } last_signal = signal; } // end if videostream @@ -2755,7 +2757,7 @@ bool Monitor::Decode() { ZMPacket *packet = packet_lock->packet_; packetqueue.increment_it(decoder_it); if (packet->codec_type != AVMEDIA_TYPE_VIDEO) { - delete packet_lock; + packetqueue.unlock(packet_lock); return true; // Don't need decode } @@ -2871,7 +2873,7 @@ bool Monitor::Decode() { shared_data->signal = ( capture_image and signal_check_points ) ? CheckSignal(capture_image) : true; shared_data->last_write_index = index; shared_data->last_write_time = packet->timestamp->tv_sec; - delete packet_lock; + packetqueue.unlock(packet_lock); return true; } // end bool Monitor::Decode()