Check for thread status before waiting. Fixes hang
This commit is contained in:
parent
9f49ac217e
commit
75973a2df1
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue