diff --git a/.gitignore b/.gitignore index edfab7b5..da359efd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.kdev4 *.[oa] *.vpwhist *.vtg @@ -125,4 +126,4 @@ Projects/img_mill/Debug_CPU_ONLY/* Projects/img_mill/side/DarkHelp Projects/img_mill/side/codeberg_darknet Projects/img_mill/side/DarkHelp/* -Projects/img_mill/side/codeberg_darknet/* \ No newline at end of file +Projects/img_mill/side/codeberg_darknet/* diff --git a/lib/App/common/kernelModuleEmbedVideo.cpp b/lib/App/common/kernelModuleEmbedVideo.cpp index 40d2e949..c19d1df5 100644 --- a/lib/App/common/kernelModuleEmbedVideo.cpp +++ b/lib/App/common/kernelModuleEmbedVideo.cpp @@ -1523,7 +1523,7 @@ bool kernelModuleEmbedVideo::dispatchEvent( EVENT_CONTAINER *Evt ){ if( tData ){ if( !saveStreamPicture( tData ) ) LOG_ERROR("Save Error!"); tData->assoc_event_ids.clear(); - delete( tData ); + free( tData ); Evt->m_pEvtData = NULL; #ifdef DEBUG_EXTRA LOG("Event Data Saved!"); @@ -3883,7 +3883,7 @@ void streamHandler::m_fThreadProc( void ){ //m_qEncodingQueue.pop(); //m_mEncodingQueueProtector.unlock(); sws_scale( m_pConvertCtx, tData->data, tData->linesize, 0, tData->rows, m_pAVFrame->data, m_pAVFrame->linesize ); - free( tData->data[0] ); + free( tData->data[0] ); /* diff --git a/lib/components/base/basicRing.h b/lib/components/base/basicRing.h index 4e3e54c2..a7ac90db 100644 --- a/lib/components/base/basicRing.h +++ b/lib/components/base/basicRing.h @@ -7,7 +7,7 @@ /** * TODO: Add class description - * + * * @author Gagua */ template class basicRing { @@ -61,8 +61,7 @@ template int basicRing::push( T *ptr ){ int RetVal; m_pAccessMutex.lock(); if ( last == NULL ){ - //last = new basicRingElement(); - last = ( basicRingElement *) malloc ( sizeof( basicRingElement ) ); + last = new basicRingElement(); if( last != NULL ) { first = last; last->prev = NULL; @@ -72,11 +71,10 @@ template int basicRing::push( T *ptr ){ return -1; }; } else { - //last->next = new basicRingElement(); - last->next = ( basicRingElement *) malloc ( sizeof( basicRingElement ) ); + last->next = new basicRingElement(); if( last->next!= NULL ) { last->next->prev = last; - last = last->next; + last = last->next; } else { m_pAccessMutex.unlock(); return -1; @@ -94,7 +92,7 @@ template int basicRing::add(T* ptr) { int RetVal; m_pAccessMutex.lock(); if (first == NULL) { - first = (basicRingElement*) malloc(sizeof(basicRingElement)); + first = new basicRingElement(); if (first != NULL) { last = first; first->prev = NULL; @@ -105,7 +103,7 @@ template int basicRing::add(T* ptr) { }; } else { basicRingElement* tVal; - tVal = (basicRingElement*) malloc(sizeof(basicRingElement)); + tVal = new basicRingElement(); if (tVal != NULL) { tVal->next = first; first->prev = tVal; @@ -195,11 +193,11 @@ template int basicRing::removeAt( basicRingElement *&cursor ){ template T *basicRing::pop( void ){ basicRingElement *temp; T *RetVal; - m_pAccessMutex.lock(); + m_pAccessMutex.lock(); if( first != NULL ){ if (first == last) last = NULL; RetVal = first->data; - temp = first->next; + temp = first->next; delete first; first = temp; count --; @@ -284,7 +282,7 @@ template void basicRing::getSequentalDown( void ){ template basicRing::~basicRing(){ basicRingElement *cursor; cursor = begin(); - m_pAccessMutex.unlock(); + m_pAccessMutex.unlock(); while( removeAt( cursor ) ); };