From 657a5edda4ce0135672a2f0a124e024f06b02c0b Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 17 Mar 2021 10:11:06 -0400 Subject: [PATCH] If decoding disabled, set signal and last_write_time in the Capture thread. So that zm_watch knows we are alive --- src/zm_monitor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 2835146ff..86d1774f4 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2567,7 +2567,11 @@ int Monitor::Capture() { return -1; } else if ( captureResult > 0 ) { // If we captured, let's assume signal, ::Decode will detect further - shared_data->signal = true; + if (!decoding_enabled) { + shared_data->last_write_index = index; + shared_data->last_write_time = packet->timestamp->tv_sec; + shared_data->signal = true; + } Debug(2, "Have packet stream_index:%d ?= videostream_id:(%d) q.vpktcount(%d) event?(%d) ", packet->packet.stream_index, video_stream_id, packetqueue.packet_count(video_stream_id), ( event ? 1 : 0 ) );