mildly better threading and fixed redo bug

This commit is contained in:
itsmattkc
2018-07-26 16:40:08 +01:00
parent 2cf3ecffc4
commit 5ea746a053
5 changed files with 21 additions and 19 deletions
+6 -5
View File
@@ -77,17 +77,18 @@ void Clip::reset() {
codecCtx = NULL;
texture = NULL;
cache_A.frames = NULL;
cache_B.frames = NULL;
cache_B.frames = NULL;
}
Clip::~Clip() {
if (open) {
close_clip(this);
}
// make sure clip has closed before clip is destroyed
open_lock.lock();
open_lock.unlock();
// make sure clip has closed before clip is destroyed
if (multithreaded) {
cacher->wait();
}
}
if (opening_transition != NULL) delete opening_transition;
if (closing_transition != NULL) delete closing_transition;