fixed a bug on Linux when exiting while recording

This commit is contained in:
lostjared
2017-02-15 09:09:26 -08:00
parent e6f2c7e7a7
commit 3941595386
4 changed files with 5 additions and 3 deletions

View File

@@ -109,6 +109,10 @@ void Playback::run() {
}
}
}
if(stop == false && recording && writer.isOpened()) {
writer.write(frame);
}
mutex.unlock();
if(frame.channels()==3) {
@@ -118,9 +122,7 @@ void Playback::run() {
img = QImage((const unsigned char*)(frame.data), frame.cols, frame.rows, QImage::Format_Indexed8);
}
if(recording && writer.isOpened()) {
writer.write(frame);
}
emit procImage(img);
this->msleep(delay);
if(isStep == true) {