Check for thread status before waiting. Fixes hang

This commit is contained in:
Isaac Connor 2021-04-27 10:28:28 -04:00
parent 9f49ac217e
commit 75973a2df1
1 changed files with 1 additions and 1 deletions

View File

@ -1909,7 +1909,7 @@ bool Monitor::Analyse() {
if (!(analysis_image_count % (motion_frame_skip+1))) {
if (decoding_enabled) {
while (!snap->image and !snap->decoded and !zm_terminate) {
while (!snap->image and !snap->decoded and !zm_terminate and !analysis_thread->Stopped()) {
// Need to wait for the decoder thread.
Debug(1, "Waiting for decode");
packet_lock->wait();