updated threading code, fixed segmentation fault

This commit is contained in:
Jared Bruni
2020-02-22 00:57:42 -08:00
parent c056072a97
commit fd806ac39f

View File

@@ -272,9 +272,9 @@ void Playback::run() {
continue; continue;
} }
stop = true; stop = true;
ac::release_all_objects();
mutex.unlock(); mutex.unlock();
emit stopRecording(); emit stopRecording();
ac::release_all_objects();
return; return;
} }
cv::Mat temp_frame; cv::Mat temp_frame;
@@ -394,7 +394,9 @@ void Playback::run() {
emit frameIncrement(); emit frameIncrement();
} }
} }
mutex.lock();
ac::release_all_objects(); ac::release_all_objects();
mutex.unlock();
} }