fix memleak

This commit is contained in:
Isaac Connor 2018-03-10 10:12:12 -05:00
parent a419906361
commit 2291816f4e
2 changed files with 5 additions and 10 deletions

View File

@ -605,11 +605,6 @@ bool Monitor::connect() {
Monitor::~Monitor() {
if ( event_delete_thread ) {
event_delete_thread->join();
delete event_delete_thread;
event_delete_thread = NULL;
}
if ( timestamps ) {
@ -634,6 +629,11 @@ Monitor::~Monitor() {
Info("%s: image_count:%d - Closing event %d, shutting down", name, image_count, event->Id() );
closeEvent();
}
if ( event_delete_thread ) {
event_delete_thread->join();
delete event_delete_thread;
event_delete_thread = NULL;
}
if ( deinterlacing_value == 4 ) {
delete next_buffer.image;

View File

@ -214,11 +214,6 @@ bool VideoStore::open() {
}
} // end if orientation
} else {
/** Create a new frame to store the */
if ( !(video_in_frame = zm_av_frame_alloc()) ) {
Error("Could not allocate video_in frame");
return false;
}
for ( unsigned int i = 0; i < sizeof(codec_data) / sizeof(*codec_data); i++ ) {
if ( codec_data[i].codec_id != monitor->OutputCodec() )
continue;