Since we loop in here, need to lock the packetqueue

This commit is contained in:
Isaac Connor 2021-01-27 11:48:19 -05:00
parent bbba0f679b
commit be893fe9e4
1 changed files with 1 additions and 0 deletions

View File

@ -479,6 +479,7 @@ bool zm_packetqueue::increment_it(packetqueue_iterator *it, int stream_id) {
return false; return false;
} }
std::unique_lock<std::mutex> lck(mutex);
do { do {
++(*it); ++(*it);
} while ( (*it != pktQueue.end()) and ( (*(*it))->packet.stream_index != stream_id) ); } while ( (*it != pktQueue.end()) and ( (*(*it))->packet.stream_index != stream_id) );