From c3cfd096c7e8635b8cb81962ed26d4b35202df35 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 7 Nov 2017 09:34:47 -0500 Subject: [PATCH] Don't connect to the monitor when doing an eventStream --- src/zm_eventstream.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/zm_eventstream.h b/src/zm_eventstream.h index 07e161214..152935d65 100644 --- a/src/zm_eventstream.h +++ b/src/zm_eventstream.h @@ -27,6 +27,7 @@ #include "zm_stream.h" #include "zm_video.h" #include "zm_ffmpeg_input.h" +#include "zm_monitor.h" #ifdef __cplusplus extern "C" { @@ -108,11 +109,17 @@ class EventStream : public StreamBase { } void setStreamStart( int init_event_id, unsigned int init_frame_id=0 ) { loadInitialEventData( init_event_id, init_frame_id ); - loadMonitor( event_data->monitor_id ); + if ( !(monitor = Monitor::Load( event_data->monitor_id, false, Monitor::QUERY )) ) { + Fatal( "Unable to load monitor id %d for streaming", event_data->monitor_id ); + return; + } } void setStreamStart( int monitor_id, time_t event_time ) { loadInitialEventData( monitor_id, event_time ); - loadMonitor( monitor_id ); + if ( !(monitor = Monitor::Load( event_data->monitor_id, false, Monitor::QUERY )) ) { + Fatal( "Unable to load monitor id %d for streaming", monitor_id ); + return; + } } void setStreamMode( StreamMode p_mode ) { mode = p_mode;