Have to wait until we are finished with the packet before unlocking.

This commit is contained in:
Isaac Connor 2021-03-17 16:11:31 -04:00
parent fb28c6b365
commit ccb1bc1a7d
1 changed files with 1 additions and 1 deletions

View File

@ -2829,11 +2829,11 @@ bool Monitor::Decode() {
*(image_buffer[index].timestamp) = *(packet->timestamp); *(image_buffer[index].timestamp) = *(packet->timestamp);
} // end if have image } // end if have image
packet->decoded = true; packet->decoded = true;
delete packet_lock;
shared_data->signal = ( capture_image and signal_check_points ) ? CheckSignal(capture_image) : true; shared_data->signal = ( capture_image and signal_check_points ) ? CheckSignal(capture_image) : true;
shared_data->last_write_index = index; shared_data->last_write_index = index;
shared_data->last_write_time = packet->timestamp->tv_sec; shared_data->last_write_time = packet->timestamp->tv_sec;
delete packet_lock;
return true; return true;
} // end bool Monitor::Decode() } // end bool Monitor::Decode()