fix memleak
This commit is contained in:
parent
a419906361
commit
2291816f4e
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue