added lock

This commit is contained in:
Jared Bruni
2021-09-04 05:51:49 -07:00
parent a928d840f3
commit c0ca7a3c40

View File

@@ -121,11 +121,11 @@ bool Playback::setVideoCamera(std::string name, int type, int device, int res, c
} }
void Playback::setVector(std::vector<FilterValue> v) { void Playback::setVector(std::vector<FilterValue> v) {
mutex_add.lock(); mutex.lock();
// here: // here:
//ac::release_all_objects(); //ac::release_all_objects();
current = v; current = v;
mutex_add.unlock(); mutex.unlock();
} }
unsigned long Playback::calcMem() { unsigned long Playback::calcMem() {
@@ -271,9 +271,9 @@ void Playback::setIndexChanged(std::string value) {
prev_filter = current_filter; prev_filter = current_filter;
current_filter = filter_map[value]; current_filter = filter_map[value];
alpha = 1.0; alpha = 1.0;
mutex.unlock();
// here: // here:
//ac::release_all_objects(); //ac::release_all_objects();
mutex.unlock();
} }
void Playback::setSubFilter(int index) { void Playback::setSubFilter(int index) {