fix memleak
This commit is contained in:
parent
a419906361
commit
2291816f4e
|
@ -605,11 +605,6 @@ bool Monitor::connect() {
|
||||||
|
|
||||||
Monitor::~Monitor() {
|
Monitor::~Monitor() {
|
||||||
|
|
||||||
if ( event_delete_thread ) {
|
|
||||||
event_delete_thread->join();
|
|
||||||
delete event_delete_thread;
|
|
||||||
event_delete_thread = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ( timestamps ) {
|
if ( timestamps ) {
|
||||||
|
@ -634,6 +629,11 @@ Monitor::~Monitor() {
|
||||||
Info("%s: image_count:%d - Closing event %d, shutting down", name, image_count, event->Id() );
|
Info("%s: image_count:%d - Closing event %d, shutting down", name, image_count, event->Id() );
|
||||||
closeEvent();
|
closeEvent();
|
||||||
}
|
}
|
||||||
|
if ( event_delete_thread ) {
|
||||||
|
event_delete_thread->join();
|
||||||
|
delete event_delete_thread;
|
||||||
|
event_delete_thread = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ( deinterlacing_value == 4 ) {
|
if ( deinterlacing_value == 4 ) {
|
||||||
delete next_buffer.image;
|
delete next_buffer.image;
|
||||||
|
|
|
@ -214,11 +214,6 @@ bool VideoStore::open() {
|
||||||
}
|
}
|
||||||
} // end if orientation
|
} // end if orientation
|
||||||
} else {
|
} 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++ ) {
|
for ( unsigned int i = 0; i < sizeof(codec_data) / sizeof(*codec_data); i++ ) {
|
||||||
if ( codec_data[i].codec_id != monitor->OutputCodec() )
|
if ( codec_data[i].codec_id != monitor->OutputCodec() )
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue