Fix memory leak
This commit is contained in:
parent
b7c709c709
commit
85de10ffb5
@ -40,12 +40,9 @@ namespace Recorder
|
||||
}
|
||||
ThreadData* td = (ThreadData*)obj;
|
||||
Synchronised<std::list<std::tuple<uint8_t*, unsigned, int> > >*
|
||||
jpg_data = (Synchronised<std::list<std::tuple<uint8_t*,
|
||||
unsigned, int> > >*)td->m_data;
|
||||
jpg_data = (Synchronised<std::list<std::tuple<uint8_t*, unsigned,
|
||||
int> > >*)td->m_data;
|
||||
pthread_cond_t* cond_request = td->m_request;
|
||||
|
||||
const unsigned width = irr_driver->getActualScreenSize().Width;
|
||||
const unsigned height = irr_driver->getActualScreenSize().Height;
|
||||
int64_t frames_encoded = 0;
|
||||
while (true)
|
||||
{
|
||||
|
@ -107,7 +107,8 @@ namespace Recorder
|
||||
g_jpg_list.getData().emplace_back((uint8_t*)NULL, 0, 0);
|
||||
pthread_cond_signal(&g_jpg_request);
|
||||
g_jpg_list.unlock();
|
||||
pthread_join(*g_video_thread.getAtomic(), NULL);
|
||||
pthread_join(*g_video_thread.getData(), NULL);
|
||||
delete g_video_thread.getData();
|
||||
g_video_thread.setAtomic(NULL);
|
||||
Recorder::writeMKV(g_recording_name + ".video",
|
||||
g_recording_name + ".audio");
|
||||
|
Loading…
x
Reference in New Issue
Block a user