mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 12:50:07 +01:00
added lock
This commit is contained in:
@@ -398,6 +398,7 @@ void Playback::run() {
|
|||||||
static int frame_count = 0;
|
static int frame_count = 0;
|
||||||
++frame_count;
|
++frame_count;
|
||||||
if(frame_count > frame_num) {
|
if(frame_count > frame_num) {
|
||||||
|
mutex.lock();
|
||||||
frame_count = 0;
|
frame_count = 0;
|
||||||
switch(cycle_on) {
|
switch(cycle_on) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -425,6 +426,7 @@ void Playback::run() {
|
|||||||
}
|
}
|
||||||
if(blend_set == true && cycle_image != 0)
|
if(blend_set == true && cycle_image != 0)
|
||||||
blend_image = cycle_image->clone();
|
blend_image = cycle_image->clone();
|
||||||
|
mutex.unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ private:
|
|||||||
std::string png_path;
|
std::string png_path;
|
||||||
VideoMode mode;
|
VideoMode mode;
|
||||||
std::atomic<int> device_num;
|
std::atomic<int> device_num;
|
||||||
std::string file_name_png;
|
|
||||||
unsigned long *frame_index;
|
unsigned long *frame_index;
|
||||||
std::atomic<unsigned int> red, green, blue;
|
std::atomic<unsigned int> red, green, blue;
|
||||||
std::atomic<unsigned int> bright_, gamma_, saturation_;
|
std::atomic<unsigned int> bright_, gamma_, saturation_;
|
||||||
|
|||||||
Reference in New Issue
Block a user