When de-interlacing, need to wait for decoder. Fixes race

pull/3238/head
Isaac Connor 2021-05-17 16:32:19 -04:00
parent 68fb87c861
commit 24b3f4c1b7
1 changed files with 1 additions and 1 deletions

View File

@ -1850,7 +1850,7 @@ bool Monitor::Analyse() {
/* try to stay behind the decoder. */
if (decoding_enabled) {
while (!snap->image and !snap->decoded and !zm_terminate and !analysis_thread->Stopped()) {
while ((!snap->image or deinterlacing_value) 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();