Move our recording flag deeper into closeevent

pull/1622/head
Steve Gilvarry 2016-09-13 22:58:38 +10:00
parent e371d9ec7f
commit fc060135fe
1 changed files with 3 additions and 4 deletions

View File

@ -3304,16 +3304,15 @@ void Monitor::TimestampImage( Image *ts_image, const struct timeval *ts_time ) c
}
}
bool Monitor::closeEvent()
{
video_store_data->recording = false;
if ( event )
bool Monitor::closeEvent() {
if (event)
{
if ( function == RECORD || function == MOCORD )
{
gettimeofday( &(event->EndTime()), NULL );
}
delete event;
video_store_data->recording = false;
event = 0;
return( true );
}