if no filter selected run at correct speed

This commit is contained in:
lostjared
2017-03-01 18:09:02 -08:00
parent 99c5cb5adf
commit fcb8b60370
2 changed files with 5 additions and 4 deletions

View File

@@ -49,6 +49,9 @@ void Playback::setDisplayed(bool shown) {
}
void Playback::run() {
int duration = 1000/ac::fps;
while(!stop) {
mutex.lock();
if(!capture.read(frame)) {
@@ -78,6 +81,8 @@ void Playback::run() {
draw_plugin(frame, cur[i].second);
}
}
} else {
msleep(duration);
}
mutex.lock();
if(recording && writer.isOpened()) {