diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index b17bf97b1..8fc0a507a 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1797,10 +1797,6 @@ void Monitor::UpdateAnalysisFPS() { // If there isn't then we keep pre-event + alarm frames. = pre_event_count bool Monitor::Analyse() { - if (!Enabled()) { - Warning("Shouldn't be doing Analyse when not Enabled"); - return false; - } // if have event, send frames until we find a video packet, at which point do analysis. Adaptive skip should only affect which frames we do analysis on. @@ -3153,10 +3149,12 @@ int Monitor::PrimeCapture() { audio_fifo = new Fifo(shared_data->audio_fifo_path, true); } } // end if rtsp_server + if (decoding_enabled) { if (!decoder_it) decoder_it = packetqueue.get_video_it(false); if (!decoder) decoder = new DecoderThread(this); } + if (!analysis_it) analysis_it = packetqueue.get_video_it(false); if (!analysis_thread) { Debug(1, "Starting an analysis thread for monitor (%d)", id); diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 7969d2eef..f12910597 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -445,10 +445,6 @@ public: } inline const char *EventPrefix() const { return event_prefix; } inline bool Ready() const { - if ( function <= MONITOR ) { - Error("Should not be calling Ready if the function doesn't include motion detection"); - return false; - } if ( image_count >= ready_count ) { return true; }